From 28e8f9f365a18a782588e15901360f1023017fd9 Mon Sep 17 00:00:00 2001 From: Mill Chen Date: Wed, 8 May 2019 18:50:05 +0800 Subject: [PATCH] Add 2 attributes for list_divider_material We added two attributes for list divider, one gets set up the color of list divider and the other gets set up the opacity of its color. This approach facilitates updating the color of the list divider for device default themes. Bug: 129943610 Test: visual Change-Id: Ia319a31e223a86d71720e2dab63dce200ca824df --- core/res/res/drawable/list_divider_material.xml | 4 ++-- core/res/res/values-night/themes_device_defaults.xml | 3 ++- core/res/res/values/attrs.xml | 4 ++++ core/res/res/values/colors_device_defaults.xml | 2 ++ core/res/res/values/colors_material.xml | 3 +++ core/res/res/values/themes_device_defaults.xml | 3 ++- core/res/res/values/themes_material.xml | 4 ++++ 7 files changed, 19 insertions(+), 4 deletions(-) diff --git a/core/res/res/drawable/list_divider_material.xml b/core/res/res/drawable/list_divider_material.xml index 658a59d573302..e4c12fb1ad4e5 100644 --- a/core/res/res/drawable/list_divider_material.xml +++ b/core/res/res/drawable/list_divider_material.xml @@ -15,8 +15,8 @@ --> - + android:tint="?attr/colorListDivider"> + diff --git a/core/res/res/values-night/themes_device_defaults.xml b/core/res/res/values-night/themes_device_defaults.xml index b8bc17f2a2322..051f7a03176f4 100644 --- a/core/res/res/values-night/themes_device_defaults.xml +++ b/core/res/res/values-night/themes_device_defaults.xml @@ -59,7 +59,8 @@ easier. @color/primary_dark_device_default_settings @color/primary_dark_device_default_settings - @color/list_divider_color_dark + @color/list_divider_color_dark + @color/list_divider_opacity_device_default_dark @style/TextAppearance.Material @@ -424,6 +426,8 @@ please see themes_device_defaults.xml. 0.6 @color/error_color_material_light ?attr/colorBackground + ?attr/colorForeground + @color/list_divider_opacity_material @style/TextAppearance.Material