Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android password XML attribute - Deprecated

How do I mask editText now?

enter image description here

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

like image 992
Kim Montano Avatar asked Apr 23 '26 18:04

Kim Montano


2 Answers

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

like image 150
Farhad Faghihi Avatar answered Apr 25 '26 06:04

Farhad Faghihi


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

like image 42
Sajal Narang Avatar answered Apr 25 '26 08:04

Sajal Narang



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!