I updated the Android Support Repository as usual to 36.0.0 and versions 24.2.0 were made available for com.android.support:appcompat-v7 , etc.

And now there is an automatic button (eye): hide / show the entered password

enter image description here

It seems cool and you do not need to manually do it, but the question is this:

How to change it to white (light) color?

    1 answer 1

    The color is changed by the passwordToggleTint parameter:

     <android.support.design.widget.TextInputLayout android:id="@+id/passTextInputLayout" android:layout_width="match_parent" android:layout_height="wrap_content" style="?attr/textInputLayoutStyle" app:passwordToggleTint="@android:color/holo_green_dark" > <android.support.v7.widget.AppCompatEditText /> </android.support.design.widget.TextInputLayout> 

    Example:

    • I believed! Thank!!! - iFr0z
    • one
      @ iFr0z In addition, you can put your own icon, which is not at all like an eye, through the app:passwordToggleDrawable attribute app:passwordToggleDrawable ( setPasswordVisibilityToggleDrawable() method) - pavlofff
    • @pavlofff oh thanks a lot for the info !! - iFr0z
    • The truth completely changes to a certain color, the effect of pressing stopped working so to speak, but these are trifles :) - iFr0z
    • one
      @ iFr0z Tweet about this eye icon , how to replace and add animation - pavlofff