title: How to set the error text alignment to center in TextInputLayout
body: <p>How to align the error text message to the center and below of edittext.I tried to align but its not working.Here is my code:</p>
  
  <p><a href="https://i.stack.imgur.com/JkNC6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JkNC6.png" alt="enter image description here"></a></p>
  
  <blockquote>
    <p>Xml</p>
  </blockquote>
  
  <pre><code>&lt;android.support.design.widget.TextInputLayout
                      android:layout_width="fill_parent"
                      android:layout_height="wrap_content"
                      android:id="@+id/tilEmail"&gt;
   &lt;EditText
                      android:layout_width="match_parent"
                      android:id="@+id/mob"
                      android:layout_height="35dp"
                      android:background="@drawable/round_corner_3"
                      android:inputType="phone"
                      android:hint="Mobile Number"
                      android:textColorHint="@color/colorGray"
                      android:textColor="@color/Black"
                          android:drawablePadding="10dp"/&gt;
                  &lt;/android.support.design.widget.TextInputLayout&gt;
  </code></pre>
  
  <p>Java class</p>
  
  <pre><code>til = (TextInputLayout) findViewById(R.id.tilEmail);
  
                       til.setError("Mobile number not valid");
  
                       til.setError(Html.fromHtml("&lt;font color='red'&gt;Mobile number not valid&lt;/font&gt;"));
                      mobile.setError(null);
  
           mobile.getBackground().setColorFilter(Color.WHITE, PorterDuff.Mode.SRC_ATOP);
                      Toast.makeText(getApplicationContext(), "Phone number or Password is not valid", Toast.LENGTH_SHORT).show();
  
                  }
  </code></pre>