If you would like to use default eye icon (show/hide password) but change the icon color
then you simply put the line
app:passwordToggleTint="@color/yourColor"
If you would like to use custom eye icon, you should use
app:passwordToggleDrawable
to change the icon. and use
app:passwordToggleTint
to change the color of the icon. your custom icon color does not show. Tint color will be shown. The whole xml code like below:
android:id="@+id/text_input_layout_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColorHint="@color/yourColor"
android:theme="@style/TextLabelLogin"
app:hintTextAppearance="@style/TextAppearance.App.TextInputLayout"
app:passwordToggleEnabled="true"
app:passwordToggleTint="@color/yourColor"
app:passwordToggleDrawable="@drawable/show_password_selector">
android:id="@+id/etPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bottom_line_shape"
android:hint="@string/password"
android:textColorHint="@color/yourColor"
android:inputType="textPassword"
android:textColor="@color/yourColor"/>
and show_password_selector.xml is given below:
Hope that will help all.