当前位置: 动力学知识库 > 问答 > 编程问答 >

java - Android password XML attribute - Deprecated

问题描述:

How do I mask editText now?

My inputType is number. How should I mask it now and at the same time restricting it to just number?

网友答案:

You can use android:inputType="numberPassword" for the EditText.

网友答案:

Use android:inputType="numberPassword" as your attribute

网友答案:

Replace android:inputType="number" with android:inputType="numberPassword"

Delete android:password="true"

For explanations on each of the values inputType can have: http://developer.android.com/reference/android/widget/TextView.html#attr_android%3ainputType

网友答案:

Replace your android:password="true" with android:inputType="textPassword". There is a list given for inputType like numberPassword, numberUri, Date etc.. For more details check on developer.android.com.

分享给朋友:
您可能感兴趣的文章:
随机阅读: