From 6ca235de0291a05ee4156703bb540875fa8bfdfd Mon Sep 17 00:00:00 2001 From: Jason Monk Date: Thu, 5 Jan 2017 15:12:04 -0500 Subject: [PATCH] Add primaryContentAlpha attribute And create a generic primary text selector that can be used for all themes. Test: Manual Change-Id: I274da909209188d7a8f4924ee8c64eff7011b7e2 --- api/current.txt | 1 + api/system-current.txt | 1 + api/test-current.txt | 1 + core/res/res/color/text_color_primary.xml | 23 +++++++++++++++++++++++ core/res/res/values/attrs.xml | 2 ++ core/res/res/values/colors_material.xml | 2 ++ core/res/res/values/public.xml | 2 ++ core/res/res/values/symbols.xml | 1 + core/res/res/values/themes_material.xml | 10 ++++++---- 9 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 core/res/res/color/text_color_primary.xml diff --git a/api/current.txt b/api/current.txt index 96c47ed52ca27..4f907a76098db 100644 --- a/api/current.txt +++ b/api/current.txt @@ -989,6 +989,7 @@ package android { field public static final int preferenceStyle = 16842894; // 0x101008e field public static final int presentationTheme = 16843712; // 0x10103c0 field public static final int previewImage = 16843482; // 0x10102da + field public static final int primaryContentAlpha = 16843367; // 0x1010267 field public static final int priority = 16842780; // 0x101001c field public static final int privateImeOptions = 16843299; // 0x1010223 field public static final int process = 16842769; // 0x1010011 diff --git a/api/system-current.txt b/api/system-current.txt index f2e42ebafa52a..46aba0b7985e3 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -1098,6 +1098,7 @@ package android { field public static final int preferenceStyle = 16842894; // 0x101008e field public static final int presentationTheme = 16843712; // 0x10103c0 field public static final int previewImage = 16843482; // 0x10102da + field public static final int primaryContentAlpha = 16843367; // 0x1010267 field public static final int priority = 16842780; // 0x101001c field public static final int privateImeOptions = 16843299; // 0x1010223 field public static final int process = 16842769; // 0x1010011 diff --git a/api/test-current.txt b/api/test-current.txt index 96ddfc793c2b3..0440967e38b11 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -989,6 +989,7 @@ package android { field public static final int preferenceStyle = 16842894; // 0x101008e field public static final int presentationTheme = 16843712; // 0x10103c0 field public static final int previewImage = 16843482; // 0x10102da + field public static final int primaryContentAlpha = 16843367; // 0x1010267 field public static final int priority = 16842780; // 0x101001c field public static final int privateImeOptions = 16843299; // 0x1010223 field public static final int process = 16842769; // 0x1010011 diff --git a/core/res/res/color/text_color_primary.xml b/core/res/res/color/text_color_primary.xml new file mode 100644 index 0000000000000..831a9c457e94e --- /dev/null +++ b/core/res/res/color/text_color_primary.xml @@ -0,0 +1,23 @@ + + + + + + + diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index dd33718dfb2a1..8e9959f5664d5 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -62,6 +62,8 @@ + + @style/TextAppearance.Material @style/TextAppearance.Material.Inverse - @color/primary_text_material_dark + @color/text_color_primary @color/primary_text_material_light @color/primary_text_inverse_when_activated_material @color/primary_text_disable_only_material_dark @@ -413,13 +414,14 @@ please see themes_device_defaults.xml. @color/background_floating_material_light @color/background_cache_hint_selector_material_light @dimen/disabled_alpha_material_light + @dimen/primary_content_alpha_material_light 0.6 @style/TextAppearance.Material @style/TextAppearance.Material.Inverse - @color/primary_text_material_light + @color/text_color_primary @color/primary_text_material_dark @color/primary_text_inverse_when_activated_material @color/secondary_text_material_light @@ -805,7 +807,7 @@ please see themes_device_defaults.xml. @color/background_floating_material_light @color/background_cache_hint_selector_material_light - @color/primary_text_material_light + @color/text_color_primary @color/primary_text_material_dark @color/secondary_text_material_light @color/secondary_text_material_dark @@ -839,7 +841,7 @@ please see themes_device_defaults.xml. @color/background_floating_material_dark @color/background_cache_hint_selector_material_dark - @color/primary_text_material_dark + @color/text_color_primary @color/primary_text_material_light @color/primary_text_disable_only_material_dark @color/secondary_text_material_dark