title: 2 hints appearing when TextInputLayout is focused
body: <p>I am having some trouble with the TextInputLayout. </p>
  
  <p>When the TextInputLayout is focused, I am seeing the hint text float above the text field and also stay on the text field. Attaching images: <a href="https://i.stack.imgur.com/9SOfZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9SOfZ.png" alt="enter image description here"></a></p>
  
  <p>And when I type stuff on the field, the text overlaps the hint on the text field. </p>
  
  <p><a href="https://i.stack.imgur.com/wJ3kZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wJ3kZ.png" alt="enter image description here"></a></p>
  
  <p>This is the XML for my TextInputLayout </p>
  
  <pre><code> &lt;com.google.android.material.textfield.TextInputLayout
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_marginTop="32dp"
          app:layout_constraintTop_toBottomOf="@+id/imageView" app:layout_constraintEnd_toEndOf="parent"
          android:layout_marginEnd="32dp" app:layout_constraintStart_toStartOf="parent"
          android:layout_marginStart="32dp" android:id="@+id/email"
          android:hint="hint"&gt;
  
      &lt;com.google.android.material.textfield.TextInputEditText
              android:layout_width="match_parent"
              android:layout_height="wrap_content"/&gt;
  </code></pre>
  
  <p>I am using the android material components library like so:</p>
  
  <blockquote>
    <p>implementation 'com.google.android.material:material:1.0.0'</p>
  </blockquote>
  
  <p>How do I get the hint TextInputLayout to hide when it is focused on has text on it? </p>
  
  <p>Here is the complete layout: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;androidx.constraintlayout.widget.ConstraintLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/login"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".ui.login.login.LoginFragment"&gt;
  &lt;ImageView
          android:layout_width="279dp"
          android:layout_height="289dp"
          android:src="@drawable/react"
          android:id="@+id/imageView" app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="8dp"
          app:layout_constraintStart_toStartOf="parent" android:layout_marginStart="8dp"
          android:layout_marginTop="24dp" app:layout_constraintTop_toTopOf="parent"
          android:contentDescription="@string/vitrix_logo"/&gt;
  &lt;com.google.android.material.button.MaterialButton
          android:text="@string/login"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:id="@+id/loginButton"
          app:layout_constraintEnd_toEndOf="parent"
          android:layout_marginEnd="32dp" app:layout_constraintStart_toStartOf="parent"
          android:layout_marginStart="32dp" android:contentDescription="@string/click_to_login_to_the_app"
          app:layout_constraintHorizontal_bias="0.0"
          android:layout_marginBottom="16dp" app:layout_constraintBottom_toTopOf="@+id/createNewAccount"/&gt;
  &lt;com.google.android.material.button.MaterialButton
          android:text="@string/create_account"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:id="@+id/createNewAccount"
          app:layout_constraintEnd_toEndOf="parent"
          android:layout_marginEnd="32dp" app:layout_constraintStart_toStartOf="parent"
          android:layout_marginStart="32dp" app:layout_constraintHorizontal_bias="0.0"
          android:layout_marginBottom="32dp" app:layout_constraintBottom_toBottomOf="parent"/&gt;
  &lt;com.google.android.material.textfield.TextInputLayout
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_marginTop="32dp"
          app:layout_constraintTop_toBottomOf="@+id/imageView" app:layout_constraintEnd_toEndOf="parent"
          android:layout_marginEnd="32dp" app:layout_constraintStart_toStartOf="parent"
          android:layout_marginStart="32dp" android:id="@+id/email"
          android:hint="hint"&gt;
  
      &lt;com.google.android.material.textfield.TextInputEditText
              android:layout_width="match_parent"
              android:layout_height="wrap_content"/&gt;
  &lt;/com.google.android.material.textfield.TextInputLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>The base activity layout</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;androidx.constraintlayout.widget.ConstraintLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/container"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".LoginActivity"&gt;
  
  
  &lt;fragment
          android:name="androidx.navigation.fragment.NavHostFragment"
          android:layout_width="0dp"
          android:layout_height="0dp"
          app:navGraph="@navigation/navigation_graph" app:defaultNavHost="true"
          android:id="@+id/fragment" android:layout_marginStart="8dp"
          app:layout_constraintStart_toStartOf="parent" android:layout_marginTop="8dp"
          app:layout_constraintTop_toTopOf="parent" app:layout_constraintEnd_toEndOf="parent"
          android:layout_marginEnd="8dp" android:layout_marginBottom="8dp"
          app:layout_constraintBottom_toBottomOf="parent"/&gt;
  </code></pre>
  
  <p></p>