From a3ee9b813682b97e7bb7277c20dceb68bc7ef243 Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Wed, 11 May 2022 17:57:12 +0000 Subject: [PATCH] [Home Controls] Fix sizing and color of chevron. Set sizing to be material icon. It now looks like the arrow in QS. Also set tintlist to be the same as the icon. Also, make sure to disable the imageview when the icon is disabled. In this state, the icon is greyed out. Bug: 232250913 Test: Manual on large device. Sent screenshot for design to verify. Change-Id: I61647c38e6e0d678fd876b5094b3bcf63947b2b9 --- packages/SystemUI/res/drawable/ic_chevron_icon.xml | 14 +++----------- .../systemui/controls/ui/ControlViewHolder.kt | 8 +++++--- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/packages/SystemUI/res/drawable/ic_chevron_icon.xml b/packages/SystemUI/res/drawable/ic_chevron_icon.xml index acbbbcb21503f..d60cc8c74e80d 100644 --- a/packages/SystemUI/res/drawable/ic_chevron_icon.xml +++ b/packages/SystemUI/res/drawable/ic_chevron_icon.xml @@ -15,14 +15,6 @@ ~ limitations under the License. --> - - - + + + \ No newline at end of file diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt index a4f9f3a9bc08e..6a9aaf8652512 100644 --- a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt +++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt @@ -472,7 +472,6 @@ class ControlViewHolder( updateContentDescription() status.setTextColor(color) - chevronIcon.imageTintList = color control?.getCustomIcon()?.let { icon.setImageIcon(it) @@ -495,10 +494,13 @@ class ControlViewHolder( icon.imageTintList = color } } + + chevronIcon.imageTintList = icon.imageTintList } private fun setEnabled(enabled: Boolean) { - status.setEnabled(enabled) - icon.setEnabled(enabled) + status.isEnabled = enabled + icon.isEnabled = enabled + chevronIcon.isEnabled = enabled } }