Is there any way to remove floating label (hint) when the user clicks on the text field? When I click on the text field, the hint just automatically moves above the editText but it does not disappear. I want the hint to disappear whenever the user clicks on the text field and enters some texts in it.
Here is the XML code:
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/etPasswordLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:passwordToggleEnabled="true"
app:hintTextAppearance="@style/MyHintStyle"
android:textColorHint="@android:color/white"
app:hintAnimationEnabled="false">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/password_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/edittext_background"
android:hint="@string/password"
android:inputType="textPassword"
android:padding="15dp"
android:textColor="@android:color/white"
android:textColorHint="@android:color/white" />
</com.google.android.material.textfield.TextInputLayout>