I have an application where people must log in with a password. I would like only the last character to be entered for display, but all I seem to get is all dots with characters or all visible characters.
I have tried several things:
password.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
password.setTransformationMethod(PasswordTransformationMethod.getInstance());
password.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
and setting the input type in xml.
I tested only on the galaxy s2, since this is the only Android device in my office at the moment, so I do not know if there is a problem only with my device.
edit: It’s just tested on HTC Sensation from a colleague, and it works as intended on his phone, but the question remains, how to get the same thing on the Galaxy S2?
source
share