[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
This commit is contained in:
Aaron Liu
2022-05-11 17:57:12 +00:00
parent 53c979939c
commit a3ee9b8136
2 changed files with 8 additions and 14 deletions

View File

@@ -15,14 +15,6 @@
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="31dp"
android:viewportWidth="18"
android:viewportHeight="31">
<path
android:pathData="M0.0061,27.8986L2.6906,30.5831L17.9219,15.3518L2.6906,0.1206L0.0061,2.8051L12.5338,15.3518"
android:strokeAlpha="0.7"
android:fillColor="#FFFFFF"
android:fillAlpha="0.7"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24" android:tint="?attr/colorControlNormal">
<path android:fillColor="@android:color/white" android:pathData="M9.4,18 L8,16.6 12.6,12 8,7.4 9.4,6 15.4,12Z"/>
</vector>

View File

@@ -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
}
}