Por*_*jim 26 android android-edittext
如何使用手机输入和隐藏字符串的功能获取Edittext.我知道
android:inputType="textPassword"
Run Code Online (Sandbox Code Playgroud)
隐藏字符串,而
android:inputType="phone"
Run Code Online (Sandbox Code Playgroud)
打开拨号盘界面.
如何将两者结合起来?
Die*_*ano 34
android:password
不推荐使用,但AFAIK是唯一的方法,因为android:inputType="phone|textPassword"
被忽略了......
<EditText
android:id="@+id/EditText01"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:password="true"
android:inputType="phone" />
Run Code Online (Sandbox Code Playgroud)
我相信这就是你想要的?
android:inputType="numberPassword"
Run Code Online (Sandbox Code Playgroud)
编辑:在问题(2010年)时,这可能不在API中,但对于当代开发,它是可用的.