问题描述:

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.

相关阅读:
Top