Description:
I think commit https://github.com/material-components/material-components-android/commit/6a88f2b7d751e7806ae67b5aac0a47f05c3b7ae8 introduced a bug where the error icon is showing by default as long a errorIconDrawable is defined in the style. Calling setErrorEnabled(false) doesn't seem to have any effect either from what I can tell.
I'm not sure but I think perhaps setErrorIconDrawable is missing an error state check when it is calling setErrorIconVisible and that's why it's shown by default since it's called from the constructor.
Expected behavior:
I expected the error to not be shown if I haven't explicitly enabled the error by calling setErrorEnabled(true). This is how it worked in 1.1.0-alpha08.
Android API version:
29
Material Library version:
1.1.0-alpha10
I am observing a similar behavior when setting the boxBackgroundMode to 'none'. An error icon is shown. It can only be hidden by setting the app:errorIconDrawable="@null".
Most helpful comment
I am observing a similar behavior when setting the
boxBackgroundModeto'none'. An error icon is shown. It can only be hidden by setting theapp:errorIconDrawable="@null".