Fixed
Status Update
Comments
al...@android.com <al...@android.com>
ch...@google.com <ch...@google.com>
ch...@google.com <ch...@google.com> #2
Another workaround, getting the ActionBar size at run-time:
TypedValue typed_value = new TypedValue();
getTheme().resolveAttribute(android.support.v7.appcompat.R.attr.actionBarSize, typed_value, true);
swipe_refresh_layout.setProgressViewOffset(false, 0, getResources().getDimensionPixelSize(typed_value.resourceId));
TypedValue typed_value = new TypedValue();
getTheme().resolveAttribute(android.support.v7.appcompat.R.attr.actionBarSize, typed_value, true);
swipe_refresh_layout.setProgressViewOffset(false, 0, getResources().getDimensionPixelSize(typed_value.resourceId));
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>