When a TextInputLayout's app:passwordToggleEnabled
attribute is set to true and a TextInputEditText's android:enabled
attribute is set to false, how can one prevent the password toggle ImageButton from being clickable?
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="24dp"
android:hint="@string/password"
app:hintAnimationEnabled="true"
app:passwordToggleEnabled="true">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:maxLength="32"
android:maxLines="1"
android:enabled="false"/>
</com.google.android.material.textfield.TextInputLayout>
Is this a bug or expected behavior?