Commit aacbc378 authored by Gang Wu's avatar Gang Wu Committed by Commit Bot

use app:chromeDrawableTint to tint TextViewWithCompoundDrawables

We should use app:chromeDrawableTint to tint
TextViewWithCompoundDrawables instead of android:drawableTint.

android:drawableTint works on API level 23 and above. But somehow
not work for PNG drawables in API 23, and TextViewWithCompoundDrawables
provide app:chromeDrawableTint to tint, so we can use it to handle the
issue.

Bug: 1126035
Change-Id: Iebc9b0d0ccf9ca8510bd03d8285d19b2ba705cec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2402102Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Commit-Queue: Gang Wu <gangwu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805559}
parent 89a6b640
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="@string/menu_new_incognito_tab" android:text="@string/menu_new_incognito_tab"
android:drawableTint="@color/default_icon_color_secondary"
android:drawablePadding="12dp" android:drawablePadding="12dp"
app:chromeDrawableTint="@color/default_icon_color_secondary"
app:drawableWidth="24dp" app:drawableWidth="24dp"
app:drawableHeight="24dp"/> app:drawableHeight="24dp"/>
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
android:textAppearance="@style/TextAppearance.TextMedium.Secondary" android:textAppearance="@style/TextAppearance.TextMedium.Secondary"
android:singleLine="true" android:singleLine="true"
android:drawableStart="@drawable/ic_business" android:drawableStart="@drawable/ic_business"
android:drawableTint="@color/default_icon_color_secondary"
android:drawablePadding="12dp" android:drawablePadding="12dp"
app:chromeDrawableTint="@color/default_icon_color_secondary"
app:drawableWidth="20dp" app:drawableWidth="20dp"
app:drawableHeight="20dp"/> app:drawableHeight="20dp"/>
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
android:layout_weight="1" android:layout_weight="1"
android:background="?attr/listChoiceBackgroundIndicator" android:background="?attr/listChoiceBackgroundIndicator"
android:paddingStart="16dp" android:paddingStart="16dp"
android:drawableTint="@color/default_icon_color_secondary"
android:drawablePadding="12dp" android:drawablePadding="12dp"
app:chromeDrawableTint="@color/default_icon_color_secondary"
app:drawableWidth="24dp" app:drawableWidth="24dp"
app:drawableHeight="24dp" /> app:drawableHeight="24dp" />
......
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