is there any way to convert text to star '*' especially passwords when we type text in Edit Text filed .
CodePudding user response:
Add the following to your EditText
XML
android:inputType="textPassword"
CodePudding user response:
EditText
has the built in attribute android:inputType
which allows you to set the type of input that the the field is accepting.
For instance if you set it to android:inputType="phone"
then the keyboard will only display characters related to making a phonecall.
You can also set it to android:inputType="textPassword"
which will then cause the field to automatically take care of obscuring the input when the user types into it.
You can find more detail in the official documentation here and here