I want to set both errorEnabled
, and passwordToggleEnabled
true to TextInputLayout
, but it seems that the two cannot coexist, because one spans the other, like this.
I want to do this because I check the password field to meet certain criteria, and I want the user to be able to see both the error message and the password that was entered.
This is my code:
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:counterEnabled="true"
app:errorEnabled="true"
app:passwordToggleEnabled="true">
<android.support.design.widget.TextInputEditText
android:id="@+id/password_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/password"
android:inputType="textPassword" />
</android.support.design.widget.TextInputLayout>
Is it possible to move the PasswordToggle icon to the left of the exclamation mark? Or do I need to create a custom option and use it instead of the passwordToggle icon?
source
share