Fixed
Status Update
Comments
ki...@google.com <ki...@google.com> #2
Information redacted by Android Beta Feedback.
ki...@google.com <ki...@google.com> #3
Thank you for reporting this issue. We have shared this with our product and engineering team and will update this issue with more information as it becomes available.
he...@ataulm.com <he...@ataulm.com> #4
redacted
ki...@google.com <ki...@google.com> #5
Thank you for reporting this issue. We have a fix rolling out in an upcoming release.
he...@ataulm.com <he...@ataulm.com> #6
tahashfyy46@gmail com
ki...@google.com <ki...@google.com>
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 7869860590c185a90287c9b94e1de151b0c75504
Author: Kirill Grouchnikov <kirillg@google.com>
Date: Tue May 05 12:55:01 2020
Consistent resolution of text hint and link colors
Same as for changing set appearance and resolving the main
text color - do the same for text link and text hint colors.
Test: ./gradlew appcompat:appcompat:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=androidx.appcompat.widget.AppCompatEditTextTest
Test: ./gradlew appcompat:appcompat:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=androidx.appcompat.widget.AppCompatTextViewTest
Bug: 154702995
Change-Id: Iddb7f1e7f17b9bceb14c20ca0b3468b10092b8f9
M appcompat/appcompat/src/androidTest/AndroidManifest.xml
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/AppCompatEditTextTest.java
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/AppCompatTextViewTest.java
A appcompat/appcompat/src/androidTest/res/color/color_state_list_hint.xml
A appcompat/appcompat/src/androidTest/res/color/color_state_list_refs12.xml
A appcompat/appcompat/src/androidTest/res/color/color_state_list_refs34.xml
M appcompat/appcompat/src/androidTest/res/layout/appcompat_edittext_activity.xml
A appcompat/appcompat/src/androidTest/res/values/attrs.xml
M appcompat/appcompat/src/androidTest/res/values/strings.xml
M appcompat/appcompat/src/androidTest/res/values/styles.xml
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatTextHelper.java
https://android-review.googlesource.com/1302103
Branch: androidx-master-dev
commit 7869860590c185a90287c9b94e1de151b0c75504
Author: Kirill Grouchnikov <kirillg@google.com>
Date: Tue May 05 12:55:01 2020
Consistent resolution of text hint and link colors
Same as for changing set appearance and resolving the main
text color - do the same for text link and text hint colors.
Test: ./gradlew appcompat:appcompat:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=androidx.appcompat.widget.AppCompatEditTextTest
Test: ./gradlew appcompat:appcompat:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=androidx.appcompat.widget.AppCompatTextViewTest
Bug: 154702995
Change-Id: Iddb7f1e7f17b9bceb14c20ca0b3468b10092b8f9
M appcompat/appcompat/src/androidTest/AndroidManifest.xml
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/AppCompatEditTextTest.java
M appcompat/appcompat/src/androidTest/java/androidx/appcompat/widget/AppCompatTextViewTest.java
A appcompat/appcompat/src/androidTest/res/color/color_state_list_hint.xml
A appcompat/appcompat/src/androidTest/res/color/color_state_list_refs12.xml
A appcompat/appcompat/src/androidTest/res/color/color_state_list_refs34.xml
M appcompat/appcompat/src/androidTest/res/layout/appcompat_edittext_activity.xml
A appcompat/appcompat/src/androidTest/res/values/attrs.xml
M appcompat/appcompat/src/androidTest/res/values/strings.xml
M appcompat/appcompat/src/androidTest/res/values/styles.xml
M appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatTextHelper.java
Description
androidx.appcompat:appcompat
1.2.0-beta01
Theme.MaterialComponents.Light.NoActionBar
Issue
Setting the text appearance programmatically with
TextViewCompat.setTextAppearance(TextView, Int)
on anAppCompatEditText
does not take into account theme attrs being used inColorStateList
asandroid:textColorHint
(orandroid:textColorLink
).So on Lollipop, such a hint color is rendered as red (see screenshot).
Cause
Internally, it delegates to
AppCompatTextHelper.onSetTextAppearance
, which doesn't handle these two attributes - it only considersandroid:textColor
:However, it does consider them in
loadFromAttributes()
so it seems like it's an oversight.Feature request/bug fix
Update
AppCompatTextHelper
to handle theme attributes in CSLs forandroid:textColorHint
andandroid:textColorLink
inonSetTextAppearance()
as it's done inloadFromAttributes()
.Workaround
For folks in the meantime - call this too, after calling
TextViewCompat.setTextAppearance()
.