Last active
May 2, 2021 23:52
-
-
Save moyheen/08382b71314e4bb7f55c7976ac0f144a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical"> | |
<android.support.design.widget.TextInputLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
app:passwordToggleContentDescription="@string/description" | |
app:passwordToggleDrawable="@drawable/another_toggle_drawable" | |
app:passwordToggleEnabled="true" | |
app:passwordToggleTint="@color/colorAccent"> | |
<android.support.design.widget.TextInputEditText | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:hint="@string/password" | |
android:inputType="textPassword"/> | |
</android.support.design.widget.TextInputLayout> | |
</LinearLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This snippet contains a very basic example for implementing the password visibility toggle feature released in Android Support Library, revision 24.2.0