9

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

But when I type some text in it, text is getting visible character by character before changing to solid bullets.

How can I make the text invisible as the user inputs the text.

Please help me.

user3021918
  • 195
  • 1
  • 4
  • 11

3 Answers3

1

Try to add EditText attribute

android:inputType="text"

And also add programmatically

edt_password.setTransformationMethod(new PasswordTransformationMethod());

M D
  • 47,398
  • 9
  • 92
  • 112
  • I have done as you said. Still the problem is not resolved. When I type some text(say one letter), after sometime it is turning into solid bullet. – user3021918 Feb 20 '14 at 10:25
  • @user3021918 this thing is perfect working in my case. – M D Feb 20 '14 at 10:29
0

i have used the below in my application and text does not appear. 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">
user3091035
  • 33
  • 1
  • 1
  • 6
-1

Try this..

in edittext layout

  android:inputType="text"

and in your code.,put this.

  mEditText.setTransformationMethod(new AsteriskPasswordTransformationMethod());
rajshree
  • 790
  • 5
  • 18
  • but I didn't find any class with name `AsteriskPasswordTransformationMethod` in Android SDK... – Gopal Gopi Feb 20 '14 at 06:47
  • it is the name of any class.which we are using.,see herehttp://stackoverflow.com/questions/14051962/change-edittext-password-mask-character-to-asterisk – rajshree Feb 20 '14 at 06:49
  • 1
    Anyway! `AsteriskPasswordTransformationMethod` class is your custom class... it's not in API. You need to post that class also or provide a link... – Gopal Gopi Feb 20 '14 at 06:51