title: How to not change the color of the label while setting error to particular textinputlayout having edittext inside it?
body: <p>I am using a Textinputlayout and edittext inside it, problem is when I set the error to the textinputlayout at the time of validations , it changes the color of my hint label also to red. I want to put another color instead of that red color when error comes.Only the underline color and error text should turn to red.</p>
  
  <p><a href="https://i.stack.imgur.com/wTndc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wTndc.png" alt="enter image description here"></a></p>
  
  <p>above shown in the pic is the problem, I dont want the email label with red color.</p>
  
  <p>Below is my code.</p>
  
  <h1>xml file</h1>
  
  <pre><code>     &lt;android.support.design.widget.TextInputLayout
              android:layout_marginTop="30dp"
              android:layout_marginLeft="20dp"
              android:layout_marginRight="20dp"
              android:layout_marginBottom="15dp"
   app:errorTextAppearance="@style/error_appearance"
          app:hintTextAppearance="@style/TextLabel1"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:id="@+id/et1"
              android:padding="0dp"&gt;
  
          &lt;EditText
              android:id="@+id/email"
              android:hint="Email"
              android:textColorHint="#3F4B5B"
              android:maxLines="1"
              android:inputType="text"
              android:textSize="15sp"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"/&gt;
  
      &lt;/android.support.design.widget.TextInputLayout&gt;
  
  
  #java file
  
  
  #Declarations
   private TextInputLayout emailerror;
   private EditText Email;
  
  #On create 
      Email=(EditText) findViewById(R.id.email);
       emailerror=(TextInputLayout) findViewById(R.id.et1);
  
  #Inside validation method
   emailerror.setError("Enter a valid email");
  </code></pre>
  
  <h1>Style.xml</h1>
  
  <pre><code>&lt;resources&gt;
  
      &lt;!-- Base application theme. --&gt;
      &lt;style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar"&gt;
          &lt;!-- Customize your theme here. --&gt;
          &lt;item name="colorPrimary"&gt;@color/colorPrimary&lt;/item&gt;
          &lt;item name="colorPrimaryDark"&gt;@color/colorPrimaryDark&lt;/item&gt;
          &lt;item name="colorAccent"&gt;@color/colorAccent&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;style name="AppTheme.NoActionBar" parent="Base.Theme.AppCompat.Light.DarkActionBar"&gt;
          &lt;item name="windowActionBar"&gt;false&lt;/item&gt;
          &lt;item name="windowNoTitle"&gt;true&lt;/item&gt;
           TextInputLayout text color
          &lt;item name="colorControlNormal"&gt;#e0e0e0&lt;/item&gt;
          &lt;item name="colorControlActivated"&gt;#52AF44&lt;/item&gt;
          &lt;item name="android:textColorHint"&gt;#3F4B5B&lt;/item&gt;
          &lt;item name="android:windowFullscreen"&gt;true&lt;/item&gt;
      &lt;/style&gt;
  
  
  &lt;!--    &lt;style name="error" parent="@android:style/TextAppearance"&gt;
          &lt;item name="android:textColor"&gt;#ff0000&lt;/item&gt; &amp;lt;!&amp;ndash;apply the color you wat here &amp;ndash;&amp;gt;
          &lt;item name="android:textColorHint"&gt;#3E4A58&lt;/item&gt;
         &amp;lt;!&amp;ndash; &lt;item name="android:textColorHint"&gt;#3a52a6&lt;/item&gt;&amp;ndash;&amp;gt;
         &amp;lt;!&amp;ndash; &lt;item name="android:textSize"&gt;12dp&lt;/item&gt;&amp;ndash;&amp;gt;
      &lt;/style&gt;--&gt;
  
      &lt;!--&lt;style name="Widget.Design.TextInputLayout" parent="AppTheme"&gt;
          &lt;item name="hintTextAppearance"&gt;@style/TextLabel1&lt;/item&gt;
          &lt;item name="errorTextAppearance"&gt;@style/error_appearance&lt;/item&gt;
          &lt;item name="counterTextAppearance"&gt;@style/TextAppearance.Design.Counter&lt;/item&gt;
          &lt;item name="counterOverflowTextAppearance"&gt;@style/TextAppearance.Design.Counter.Overflow&lt;/item&gt;
      &lt;/style&gt;--&gt;
  
      &lt;style name="error_appearance" parent="@android:style/TextAppearance"&gt;
          &lt;item name="android:textColor"&gt;@color/colorAccent&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;style name="TextLabel1" parent="TextAppearance.Design.Hint"&gt;
          &lt;item name="android:textColor"&gt;@color/colorPrimaryDark&lt;/item&gt;
          &lt;item name="android:textSize"&gt;16sp&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;style name="ToolbarColoredBackArrow" parent="AppTheme"&gt;
          &lt;item name="android:textColorSecondary"&gt;@color/white&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;style name="EditTextHint" parent="Theme.AppCompat"&gt;
          &lt;!--&lt;item name="colorAccent"&gt;@android:color/white&lt;/item&gt;--&gt;
          &lt;item name="android:textColorHint"&gt;#989898&lt;/item&gt;
       &lt;!--   &lt;item name="colorControlNormal"&gt;@color/BackgroundtWhiteColor&lt;/item&gt;
          &lt;item name="colorControlActivated"&gt;@color/your color&lt;/item&gt;
          &lt;item name="colorControlHighlight"&gt;@color/BackgroundtWhiteColor&lt;/item&gt;--&gt;
      &lt;/style&gt;
  
      &lt;style name="Widget.App.Spinner" parent="@style/Widget.AppCompat.Spinner"&gt;
          &lt;item name="overlapAnchor"&gt;true&lt;/item&gt;
          &lt;item name="android:background"&gt;@drawable/spinner_background&lt;/item&gt;
      &lt;/style&gt;
  
  &lt;/resources&gt;
  </code></pre>