title: TextInputLayout/TextInputEditText is causing exception after hint color replacement
body: <p>I'm using TextInputEditText inside TextInputLayout and it worked perfectly since today. I just changed attribute for color and it caused this error:</p>
  <pre><code>android.view.InflateException: Binary XML file line #97: Binary XML file line #8: Error inflating class com.google.android.material.textfield.TextInputLayout
      Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.google.android.material.textfield.TextInputLayout
      Caused by: java.lang.reflect.InvocationTargetException
          at java.lang.reflect.Constructor.newInstance0(Native Method)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
          at android.view.LayoutInflater.createView(LayoutInflater.java:647)
          at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790)
          at android.view.LayoutInflater.parseInclude(LayoutInflater.java:965)
          at android.view.LayoutInflater.rInflate(LayoutInflater.java:859)
          at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
          at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)
          at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
          at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)
          at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
          at android.view.LayoutInflater.rInflate(LayoutInflater.java:866)
          at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
          at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
          at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
          at androidx.databinding.DataBindingUtil.inflate(DataBindingUtil.java:126)
          at androidx.databinding.DataBindingUtil.inflate(DataBindingUtil.java:95)
          at com.project.utils.CustomResources$Companion.inflateLayout(CustomResources.kt:62)
          at com.project.screens.Registration.getScreen(RegistrationScreen.kt:34)
          at com.project.registration.CustomViewPagerAdapter.instantiateItem(CustomViewPagerAdapter.kt:40)
          at com.project.registration.CustomViewPagerAdapter.instantiateItem(CustomViewPagerAdapter.kt:25)
          at androidx.viewpager.widget.ViewPager.addNewItem(ViewPager.java:1010)
          at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1224)
          at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1092)
          at androidx.viewpager.widget.ViewPager.onMeasure(ViewPager.java:1622)
          at android.view.View.measure(View.java:23180)
          at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715)
          at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461)
          at android.view.View.measure(View.java:23180)
          at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6764)
          at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
          at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:146)
          at android.view.View.measure(View.java:23180)
          at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6764)
          at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1535)
          at android.widget.LinearLayout.measureVertical(LinearLayout.java:825)
          at android.widget.LinearLayout.onMeasure(LinearLayout.java:704)
          at android.view.View.measure(View.java:23180)
          at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6764)
          at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
          at android.view.View.measure(View.java:23180)
          at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6764)
          at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
          at android.view.View.measure(View.java:23180)
          at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6764)
          at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
          at com.android.internal.policy.DecorView.onMeasure(DecorView.java:716)
          at android.view.View.measure(View.java:23180)
          at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2734)
          at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1583)
          at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1867)
          at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1471)
  2021-01-12 12:26:03.681 21736-21736/? E/AndroidRuntime:     at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7215)
          at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1012)
          at android.view.Choreographer.doCallbacks(Choreographer.java:823)
          at android.view.Choreographer.doFrame(Choreographer.java:758)
          at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:998)
          at android.os.Handler.handleCallback(Handler.java:873)
          at android.os.Handler.dispatchMessage(Handler.java:99)
          at android.os.Looper.loop(Looper.java:193)
          at android.app.ActivityThread.main(ActivityThread.java:6735)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
       Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 1: TypedValue{t=0x2/d=0x7f030375 a=5}
          at android.content.res.TypedArray.getColorStateList(TypedArray.java:546)
          at androidx.appcompat.widget.TintTypedArray.getColorStateList(TintTypedArray.java:184)
          at com.google.android.material.textfield.TextInputLayout.&lt;init&gt;(TextInputLayout.java:561)
          at com.google.android.material.textfield.TextInputLayout.&lt;init&gt;(TextInputLayout.java:420)
              ... 64 more
  </code></pre>
  <p>I'm using custom attributes for my App style, so I added new attribute and just created same selector for that attribute but with different color.</p>
  <p><strong>attrs.xml</strong></p>
  <pre><code>&lt;attr name=&quot;textInputFieldHint&quot; format=&quot;reference&quot;/&gt;
  </code></pre>
  <p><strong>styles.xml</strong></p>
  <pre><code>&lt;style name=&quot;AppThemeBlueColor&quot; parent=&quot;Theme.MaterialComponents.Light.NoActionBar.Bridge&quot;&gt;
      ...
      &lt;item name=&quot;textInputFieldHint&quot;&gt;@color/textinputfield_hint_blue&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  <p><strong>textinputfield_hint_blue.xml</strong></p>
  <pre><code>&lt;selector xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;
      &lt;item android:color=&quot;@color/darkBlue&quot; android:state_focused=&quot;true&quot;/&gt;
      &lt;item android:color=&quot;@color/darkGrey&quot;/&gt;
  &lt;/selector&gt;
  </code></pre>
  <p>TextInputEditTextStyles:</p>
  <pre><code>&lt;style name=&quot;TextInputLayoutStyle&quot; parent=&quot;Widget.MaterialComponents.TextInputLayout.OutlinedBox&quot;&gt;
      &lt;item name=&quot;android:textColor&quot;&gt;@color/form_edit_text_color&lt;/item&gt;
      &lt;item name=&quot;android:textColorHint&quot;&gt;?attr/textInputFieldHint&lt;/item&gt;
      &lt;item name=&quot;hintTextColor&quot;&gt;?attr/textInputFieldHint&lt;/item&gt;
      &lt;item name=&quot;boxStrokeColor&quot;&gt;?attr/textInputFieldOutline&lt;/item&gt;
      &lt;item name=&quot;errorTextColor&quot;&gt;@color/colorRed&lt;/item&gt;
      &lt;item name=&quot;android:textSize&quot;&gt;@dimen/text_normal&lt;/item&gt;
      &lt;item name=&quot;android:layout_marginBottom&quot;&gt;@dimen/textInputLayout_margin_bottom&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name=&quot;TextInputEditTextStyle&quot;&gt;
      &lt;item name=&quot;android:layout_height&quot;&gt;wrap_content&lt;/item&gt;
      &lt;item name=&quot;android:textColor&quot;&gt;@color/form_edit_text_color&lt;/item&gt;
      &lt;item name=&quot;android:textColorHint&quot;&gt;?attr/textInputFieldHint&lt;/item&gt;
      &lt;item name=&quot;boxStrokeColor&quot;&gt;?attr/textColorTertiary&lt;/item&gt;
      &lt;item name=&quot;errorTextColor&quot;&gt;@color/colorRed&lt;/item&gt;
      &lt;item name=&quot;android:textSize&quot;&gt;@dimen/text_normal&lt;/item&gt;
      &lt;item name=&quot;android:paddingStart&quot;&gt;@dimen/textInputEditText_padding_start&lt;/item&gt;
      &lt;item name=&quot;android:singleLine&quot;&gt;true&lt;/item&gt;
      &lt;item name=&quot;android:focusable&quot;&gt;true&lt;/item&gt;
      &lt;item name=&quot;android:focusableInTouchMode&quot;&gt;true&lt;/item&gt;
      &lt;item name=&quot;android:textCursorDrawable&quot;&gt;@null&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  <p>I just replaced <code>textInputFieldOutline</code> attribute with <code>textInputFieldHint</code> attribute. Both are same selectors but different color. And color does exist because its used in other layout components. Seems like some Android bug because it does not have any reason to not work when its the exact same code but different color.</p>