0

我的输入类型属性有问题,我需要在编辑文本中写入人名,但是当我运行应用程序时,键盘不会动态更改,它允许用户在名称字段中输入任何字符。这是代码:

<TextView  
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:text="Name:"/>

     <EditText  
         android:id="@+id/edittext"  
         android:layout_width="fill_parent"        
         android:layout_height="wrap_content" 
         android:inputType="textPersonName"    
     />
4

1 回答 1

0

看来您只能使用输入类型属性来限制数字。下面的链接可能会帮助您解决问题。

https://stackoverflow.com/a/4401227/1157215

于 2012-09-14T17:23:55.470 回答