1. 程式人生 > >[Android] Programmatically change input type of the EditText from PASSWORD to NORMAL

[Android] Programmatically change input type of the EditText from PASSWORD to NORMAL

這還滿神奇的,有2個解法,一個是

Just for the people who are having same problem. Just add an extra attribute to that EditText programmatically and you are done.

password.setInputType(InputType.TYPE_CLASS_TEXT |
InputType.TYPE_TEXT_VARIATION_PASSWORD);