19

I have noticed that since a few days, all my TextInputLayouts have the "error exclamation point" always enabled. I haven't changed anything about those TextInputLayouts for a long time, so I really don't understand what is happening.

Here is a screenshot of how it looks:

Do you have have any idea what could be the source of this issue? Did something recently changed with the TextInputLayouts?

Thank you very much in advance

EDIT

Here is the related code: The .xml file is really simple. It's a list of TextInputLayouts and EditTexts like this:

<com.google.android.material.textfield.TextInputLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginLeft="@dimen/default_margin"
    android:layout_marginTop="@dimen/default_margin"
    android:layout_marginRight="@dimen/default_margin">

    <com.google.android.material.textfield.TextInputEditText
        android:id="@+id/txtAddressTitle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="@string/PROFILE_SCREEN_ADDRESS_INPUT_TITLE"
        android:inputType="textPersonName|textCapWords" />

</com.google.android.material.textfield.TextInputLayout>

Also, there absolutely no mention of setError() in my Kotlin code.

Valentin
  • 5,379
  • 7
  • 36
  • 50

2 Answers2

53

You can try this. But It will permanently remove the error Icon. If you want to show it again you have do it programmatically.

app:errorIconDrawable="@null"
OhhhThatVarun
  • 3,981
  • 2
  • 26
  • 49
6

Edit: It looks like it's fixed with com.google.android.material:material:1.2.0-alpha04.


Ho, I found the issue. I actually updated the version of the Material library from version com.google.android.material:material:1.1.0-alpha08 to com.google.android.material:material:1.1.0-alpha09.

Google changed the behaviour of Text Field (see here: https://github.com/material-components/material-components-android/releases/tag/1.1.0-alpha09):

Text Field:

  • Adding option to set TextInputLayout icons to be not checkable (6a88f2b)
  • Implementing error icon for text fields (3f73804)
Valentin
  • 5,379
  • 7
  • 36
  • 50
  • Did you manage to solve this without having to downgrade to 1.1.0-alpha08? And if so, what changes did you make? – davidk Sep 11 '19 at 07:44
  • I'm using `implementation 'com.google.android.material:material:1.1.0-alpha10'` Still haing this issue – OhhhThatVarun Sep 15 '19 at 13:58