Error inflating class EditText on creating TextInputLayout on Android 4.4.2:

折月煮酒 提交于 2019-11-30 11:41:47
OShiffer

What fixed this issue was removing the parent="TextAppearance.AppCompat" from the style configuration:

So now the style looks as follows:

<style name="TextLabel">
    <!-- Hint color and label color in FALSE state -->
    <item name="android:textColorHint">@color/White</item>
    <item name="android:textColorHighlight">@android:color/white</item>
    <item name="android:textColorLink">@color/White</item>
    <item name="android:textSize">20sp</item>
    <!-- Label color in TRUE state and bar color FALSE and TRUE State -->
    <item name="colorAccent">@color/accent</item>
    <item name="colorControlNormal">@android:color/white</item>
    <item name="colorControlActivated">@color/accent</item>
</style>

And in the xml layout:

<android.support.design.widget.TextInputLayout
    android:id="@+id/email_wrapper"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_below="@+id/loginInfiLogoRL"
    android:theme="@style/TextLabel">

    <EditText
        android:id="@+id/etUserName"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="@string/login_screen_email_hint"
        android:imeOptions="actionNext"
        android:inputType="textEmailAddress"
        android:maxLines="1"
        android:nextFocusDown="@+id/etPassword"
        android:singleLine="true"
        android:textColor="@android:color/white"
        android:textColorHighlight="@color/White"
        android:textColorHint="@android:color/white" />

</android.support.design.widget.TextInputLayout>
Mohammad Rahchamani

Your problem is with another xml file. I think it's because one of your drawable files that you are using a color attribute in it. read here for more information.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!