Password Visibility Toggles

suggest change

With an input password type, you can also enable an icon that can show or hide the entire text using the passwordToggleEnabled attribute.

You can also customize that default icon using these attributes:

Example:

<android.support.design.widget.TextInputLayout
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:passwordToggleContentDescription="@string/description"
        app:passwordToggleDrawable="@drawable/another_toggle_drawable"
        app:passwordToggleEnabled="true">

            <EditText
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:inputType="textPassword"/>

</android.support.design.widget.TextInputLayout>

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents