Android password edit text displaying text

I used one Edittext with the android:inputType="textPassword" attribute android:inputType="textPassword" .

But when I enter the text into it, the text becomes a visible character by symbol, and then goes to solid marks.

How can I make the text invisible when the user enters text.

Please help me.

+7
android passwords android-edittext
source share
3 answers

Try adding the EditText attribute.

android:inputType="text"

And also add programmatically

edt_password.setTransformationMethod(new PasswordTransformationMethod());

0
source share

Try it.

in edittext layout

  android:inputType="text" 

and in your code., put this.

  mEditText.setTransformationMethod(new AsteriskPasswordTransformationMethod()); 
0
source share

I used below in my application and the text is not displayed. Worked for me!

 <EditText android:id="@+id/OldpwdET" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="20dp" android:layout_marginRight="20dp" android:layout_marginTop="30dp" android:ems="10" android:hint="@string/change_password_oldpwdET" android:minHeight="40dp" android:paddingLeft="10dp" android:inputType="textPassword"> 
0
source share

All Articles