TextView的ems和MaxLength

<EditText
android:id="@+id/et_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:ems="1"//EditText的宽度为一个中文的宽度即2个字符的宽度
android:maxLength="4"//最大可输入4个字符
android:text="8633"
android:textColor="@color/textColor"
android:textSize="14sp" />

//所以这里只能看得到86显示,33被遮住了,也不能再输入了
//中文就只显示一个1中文

 

 
 

posted on 2016-12-01 10:04  语风6649  阅读(3030)  评论(0编辑  收藏  举报

导航