Commit d741fd14 authored by Sinan Sahin's avatar Sinan Sahin Committed by Commit Bot

Fix ChromeTextInputLayout label color

This CL fixes a bug with the label text coloring in
ChromeTextInputLayout. The issue was only apparent on Android K.

Bug: 996686
Change-Id: I5e1a9e1171b303801539d9a2d9decd13b02b7f36
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1802019Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Commit-Queue: Sinan Sahin <sinansahin@google.com>
Cr-Commit-Position: refs/heads/master@{#696289}
parent 6f56a046
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/editor_dialog_section_large_spacing" android:layout_marginTop="@dimen/editor_dialog_section_small_spacing"
android:layout_marginBottom="@dimen/editor_dialog_section_large_spacing" android:layout_marginBottom="@dimen/editor_dialog_section_large_spacing"
android:layout_marginStart="@dimen/pref_autofill_field_horizontal_padding" android:layout_marginStart="@dimen/pref_autofill_field_horizontal_padding"
android:layout_marginEnd="@dimen/pref_autofill_field_horizontal_padding" android:layout_marginEnd="@dimen/pref_autofill_field_horizontal_padding"
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.BlackCaption" android:textAppearance="@style/TextAppearance.BlackCaption"
android:layout_marginTop="@dimen/editor_dialog_section_small_spacing"/> android:layout_marginTop="5dp"/>
<android.support.v7.widget.AppCompatSpinner <android.support.v7.widget.AppCompatSpinner
android:id="@+id/spinner" android:id="@+id/spinner"
......
...@@ -110,7 +110,7 @@ public class ChromeTextInputLayout extends LinearLayout { ...@@ -110,7 +110,7 @@ public class ChromeTextInputLayout extends LinearLayout {
0); 0);
ApiCompatibilityUtils.setTextAppearance(mLabel, ApiCompatibilityUtils.setTextAppearance(mLabel,
a.getResourceId(R.styleable.ChromeTextInputLayout_hintTextAppearance, a.getResourceId(R.styleable.ChromeTextInputLayout_hintTextAppearance,
android.R.style.TextAppearance_Small)); R.style.TextAppearance_BlackCaption));
mLabel.setPivotX(0f); mLabel.setPivotX(0f);
mLabel.setPivotY(mLabel.getPaint().getFontMetrics().bottom); mLabel.setPivotY(mLabel.getPaint().getFontMetrics().bottom);
mLabelStatus = LabelStatus.COLLAPSED; mLabelStatus = LabelStatus.COLLAPSED;
...@@ -146,7 +146,7 @@ public class ChromeTextInputLayout extends LinearLayout { ...@@ -146,7 +146,7 @@ public class ChromeTextInputLayout extends LinearLayout {
mLabel.setTextColor(new ColorStateList( mLabel.setTextColor(new ColorStateList(
new int[][] {new int[] {android.R.attr.state_activated}, new int[] {}}, new int[][] {new int[] {android.R.attr.state_activated}, new int[] {}},
new int[] {getColorAttribute(context, R.attr.colorControlActivated), new int[] {getColorAttribute(context, R.attr.colorControlActivated),
mLabel.getCurrentHintTextColor()})); mLabel.getCurrentTextColor()}));
mInterpolator = new FastOutSlowInInterpolator(); mInterpolator = new FastOutSlowInInterpolator();
setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES); setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
......
5da401533469391a30400471ff8cf1a80de48c73 05aa800db71f3b759f8a855671c4ffab91fe57fd
\ No newline at end of file \ No newline at end of file
0ab0c5ad68449b189104d81d0da89adb921a0b2a 0fa90ec5d41a071ef7252aab236ee082a12832ce
\ No newline at end of file \ No newline at end of file
92f09e6c99712cbec50dbf9d17395a57ec01a0b4 1513841a90d07e884e161c7bd641272c2c535792
\ No newline at end of file \ No newline at end of file
c3c29381edce372178076ce1aab2314fae19abcc 35b0a65fe1a9448c29fa7b1766e7e4a7ecadad1a
\ No newline at end of file \ No newline at end of file
79a2c0956e9229e3938e29563dad84a40a341d4c c64a5fa335db00be96011aa5f00f11bec822fd92
\ No newline at end of file \ No newline at end of file
a62e60352ce97c814ec03a9004173f04d9446325 3fa50ee480a8d71023017f5f522f0656693d3448
\ No newline at end of file \ No newline at end of file
92f09e6c99712cbec50dbf9d17395a57ec01a0b4 1513841a90d07e884e161c7bd641272c2c535792
\ No newline at end of file \ No newline at end of file
04a1fc99403079f32cd9f2f5a7301920b313cf22 f6365db616f95b919446b722a90fad6404b5694c
\ No newline at end of file \ No newline at end of file
d05e4ae3e6fb85859f3a0b4fbb0a2e5e19a672a7 cc0032490ee1299259affd3fd6f8f711763d9089
\ No newline at end of file \ No newline at end of file
538e082a5417c67de73849a2400d3663f794d14e 70364a46298b7a4d1b39a3145313c55b46014466
\ No newline at end of file \ No newline at end of file
868d4a016359732619b9547fcf7ddeacd8144086 fd89a811ce9ff2cf6fc7fd48b27ddd6d22515ed5
\ No newline at end of file \ No newline at end of file
9e1fa2bc761abc7318a17b8b6b2ac5320c09ebed 83f20c248ba144d187b0dfb29aaa22f3f10508aa
\ No newline at end of file \ No newline at end of file
2bc0811fb2ce42c53e0d80df6fe9deeee63e2a5e eae77473b2208e18dd5a4d4bca6851ad7ff1fce1
\ No newline at end of file \ No newline at end of file
215920fb72b430aae2226714a243c60710b49c4c 05d2b1a5c49cc1e50b671fc052834bd5586eeba0
\ No newline at end of file \ No newline at end of file
868d4a016359732619b9547fcf7ddeacd8144086 fd89a811ce9ff2cf6fc7fd48b27ddd6d22515ed5
\ No newline at end of file \ No newline at end of file
617697ab32bdbba1e990008ea89bff575ef277de 2fb8415214f398ea9682be6905dc1c93b22512ab
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment