title: How to customize TextInputLayout when using a Material Design Theme?
body: <p>I want to customize <code>TextInputLayout</code>'s error text color. My app theme is based on one of the <code>MaterialComponents</code> themes namely <code>Theme.MaterialComponents.Light.DarkActionBar</code>. I have created a custom text style based on <code>TextAppearance.Design.Error</code>, and created a custom style based on <code>Widget.Design.TextInputLayout</code> in order to set my <code>TextInputLayout</code> components' styles. But the error and label of the EditText are not displayed in the created style.</p>
  
  <p>Here is my code:</p>
  
  <p><strong>styles.xml</strong></p>
  
  <pre><code>&lt;style name="ErrorText" parent="TextAppearance.Design.Error"&gt;
      &lt;item name="android:textColor"&gt;@color/materialRed&lt;/item&gt;
      &lt;item name="android:textSize"&gt;16sp&lt;/item&gt;
  &lt;/style&gt;
  &lt;style name="TextInputLayoutAppearance" parent="Widget.Design.TextInputLayout"&gt;
      &lt;item name="errorTextAppearance"&gt;@style/ErrorText&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>And, I have set my <code>TextInputLayout</code>'s theme to this custom style:</p>
  
  <pre><code>&lt;com.google.android.material.textfield.TextInputLayout
      android:id="@+id/usernameWrapper"
      app:errorTextAppearance="@style/TextInputLayoutAppearance"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
  
      &lt;com.google.android.material.textfield.TextInputEditText
          android:id="@+id/username"
          android:layout_width="match_parent"
          android:layout_height="wrap_content" /&gt;
  
  &lt;/com.google.android.material.textfield.TextInputLayout&gt;
  </code></pre>