title: Animation in Android EditText Android
body: <p>I am trying to create an animated TextInput layout for my login page but I cant't make it work.</p>
  <p>below are the pictures of what I am trying to do:</p>
  <p>image when you arrive on the login page:</p>
  <p><a href="https://i.stack.imgur.com/kn3hf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kn3hf.png" alt="enter image description here" /></a></p>
  <p>when you start typing the email, the line length should decrease when email address is typed, the more you type the smaller the line became.</p>
  <p><a href="https://i.stack.imgur.com/t2XW5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t2XW5.png" alt="enter image description here" /></a></p>
  <p>Here is the layout I have created but it's not working.</p>
  <pre><code>            &lt;com.google.android.material.textfield.TextInputLayout
                  android:id=&quot;@+id/email_layout&quot;
                  android:layout_width=&quot;match_parent&quot;
                  android:layout_height=&quot;wrap_content&quot;
                  app:layout_constraintStart_toStartOf=&quot;parent&quot;
                  app:layout_constraintTop_toTopOf=&quot;parent&quot;
                  android:background=&quot;@color/transparent&quot;
                  android:textAllCaps=&quot;true&quot;
                  android:textColorHint=&quot;@color/gainsboro_00&quot;
                  android:textColor=&quot;@color/gainsboro_00&quot;
                  android:hint=&quot;@string/email&quot;&gt;
  
                  &lt;androidx.constraintlayout.widget.ConstraintLayout
                      android:layout_width=&quot;match_parent&quot;
                      android:layout_height=&quot;match_parent&quot;
                      android:background=&quot;@color/transparent&quot;&gt;
  
                      &lt;com.google.android.material.textfield.TextInputEditText
                          android:id=&quot;@+id/email_et&quot;
                          android:layout_width=&quot;wrap_content&quot;
                          android:layout_height=&quot;match_parent&quot;
                          android:inputType=&quot;textEmailAddress&quot;
                          android:textColor=&quot;@color/gainsboro_00&quot;
                          android:background=&quot;@color/transparent&quot;
                          android:minWidth=&quot;75dp&quot;
                          android:textSize=&quot;14sp&quot;
                          android:textAllCaps=&quot;true&quot;
                          app:layout_constraintStart_toStartOf=&quot;parent&quot;
                          app:layout_constraintTop_toTopOf=&quot;parent&quot;
                          app:layout_constraintBottom_toBottomOf=&quot;parent&quot; /&gt;
  
                      &lt;View
                          android:id=&quot;@+id/email_line&quot;
                          android:layout_width=&quot;match_parent&quot;
                          android:layout_height=&quot;10dp&quot;
                          android:background=&quot;@drawable/checkered_gainsboro_background&quot;
                          android:layout_marginEnd=&quot;45dp&quot;
                          app:layout_constraintStart_toEndOf=&quot;@id/email_et&quot;
                          app:layout_constraintEnd_toEndOf=&quot;parent&quot;
                          app:layout_constraintTop_toTopOf=&quot;parent&quot;
                          app:layout_constraintBottom_toBottomOf=&quot;parent&quot;/&gt;
  
                  &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  
  
  
              &lt;/com.google.android.material.textfield.TextInputLayout&gt;
  </code></pre>
  <p>Any idea how to achieve this? I think I am not far from the solution
  Thanks</p>