I have a textbox in my application and as the picture below shows,
by clicking on show-checkbox the pin edittext type must be changed to password
and any existing character in the box must be transformed to *.

I know we can use xml to define password edittext but as I explained, I need to changed the edittext type programmatically.
I couldn’t find any keyword for textbox to change its type to password, any advice.
Store the text of EditText in some temporary variable using
and then on selection of the Show checkbox change the input type of EditText from Normal to password type using
and refill the EditText with the temporary stored value of EditText using
To get it back to normal do nothing,
and get the Text.