我试过了
<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPersonName" >
Run Code Online (Sandbox Code Playgroud)
我意识到它可以接受任何角色.那么,android:inputType="textPersonName"与没有它相比,有什么特别之处呢?
使用时不会进行拼写检查,android:inputType="textPersonName"但已在中完成textCapWords。
因此,如果使用textPersonName ,名称将不会有红色下划线,但每个名称的首字母(名字,中间名,姓氏等)都不会大写。
因此,最好的解决方案是将或结合在一起 android:inputType="textPersonName|textCapWords"。
现在名称将不会有红色下划线,首字母也将大写
| 归档时间: |
|
| 查看次数: |
10508 次 |
| 最近记录: |