Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Version used: 24.2.0
Theme used: Theme.Design
Devices/Android versions reproduced on: Sony Xperia Z1 Compact
Since TextView (as opposed to AppCompatTextView) does not support ColorStateLists with theme attribute references below API 23 the following code always fails:
TextInputLayout.java:561
mErrorView.setTextAppearance(getContext(), mErrorTextAppearance);
Caused by:
TextInputLayout.java:559
mErrorView = new TextView(getContext());
Suggested fix:
TextInputLayout.java:559
mErrorView = new AppCompatTextView(getContext());
---
Additional resources:
design_error.xml
<selector xmlns:android="
<item android:state_enabled="false" android:color="?android:attr/textColorTertiary"/>
<item android:color="?attr/textColorError"/>
</selector>
values.xml
<style name="TextAppearance.Design.Error" parent="TextAppearance.AppCompat.Caption">
<item name="errorTextAppearance">@style/TextAppearance.Design.Error</item>
...
</style>