Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How to Change Password Visibility

AmolKAmolK INMember ✭✭

I want to change EditText views input type Dynamically.
If the Checkbox is selected then It should show Password and When checkbox is not checked then it should hide password by Dots | Stars....

Best Answer


  • JonDouglasJonDouglas USXamarin Team, University, Developer Group Leader Xamurai

    Your best bet is to change the EditText's InputType dynamically based on the CheckBox.Checked boolean value.

    Thus you might have the EditText default InputType to TYPE_TEXT_VARIATION_PASSWORD

    When your CheckBox.Checked is true, you would set the EditText InputType to TYPE_TEXT_VARIATION_VISIBLE_PASSWORD

    Or a variation along those lines.

  • AmolKAmolK INMember ✭✭
    Accepted Answer

    Thanks @JonDouglas

Sign In or Register to comment.