Reputation: 3015
I'm implementing a PreferenceActivity, which would ask the user for username and password. I'll use EditTextPreference for the username, but what element do I need to have a "password input", which will hide the inputted data (i.e. change to dots)?
Upvotes: 1
Views: 2083
Reputation: 36302
As android:password
is deprecated. You should instead use inputType
:
android:inputType="textPassword"
Upvotes: 4
Reputation: 13501
Use a TextView and in XML file make its property android:password = "true"
Upvotes: 0
Reputation: 10949
That should also be an EditText, but you configure it to "password"-mode.
See android:password or setTransformationMethod(TransformationMethod)
Upvotes: 2