From b6c615dba7609e5134e960a92e723cfeadfbc589 Mon Sep 17 00:00:00 2001 From: wangqi Date: Fri, 22 Jun 2018 16:27:21 -0700 Subject: UI refresh for voice call screen. Bug: 79878432 Test: screen diff tests PiperOrigin-RevId: 201758864 Change-Id: Ib3ed6636df3d337cb2fa7c5f6d8f24da035cbd0c --- java/com/android/dialer/theme/base/Theme.java | 3 +++ .../dialer/theme/base/impl/AospThemeImpl.java | 9 +++++++++ .../theme/base/res/values/theme_dialer_dark.xml | 2 +- .../theme/base/res/values/theme_dialer_light.xml | 4 ++-- .../dialer/theme/common/res/values/colors.xml | 2 +- .../res/color/dialer_dark_primary_text_color.xml | 2 +- .../res/color/dialer_dark_secondary_text_color.xml | 2 +- .../theme/hidden/res/color/dialer_icon_color.xml | 22 ++++++++++++++++++++++ .../hidden/res/values/colors_dialer_light.xml | 1 - .../dialer/theme/hidden/res/values/styles.xml | 1 - 10 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 java/com/android/dialer/theme/hidden/res/color/dialer_icon_color.xml (limited to 'java/com/android/dialer/theme') diff --git a/java/com/android/dialer/theme/base/Theme.java b/java/com/android/dialer/theme/base/Theme.java index 6e0d20a7a..2a9975b4b 100644 --- a/java/com/android/dialer/theme/base/Theme.java +++ b/java/com/android/dialer/theme/base/Theme.java @@ -17,6 +17,7 @@ package com.android.dialer.theme.base; import android.content.Context; +import android.content.res.ColorStateList; import android.support.annotation.ColorInt; import android.support.annotation.IntDef; import android.support.annotation.StyleRes; @@ -50,6 +51,8 @@ public interface Theme { @ColorInt int getColorIcon(); + ColorStateList getColorIconStateList(); + @ColorInt int getColorIconSecondary(); diff --git a/java/com/android/dialer/theme/base/impl/AospThemeImpl.java b/java/com/android/dialer/theme/base/impl/AospThemeImpl.java index c8f20c731..35dcef27c 100644 --- a/java/com/android/dialer/theme/base/impl/AospThemeImpl.java +++ b/java/com/android/dialer/theme/base/impl/AospThemeImpl.java @@ -17,6 +17,7 @@ package com.android.dialer.theme.base.impl; import android.content.Context; +import android.content.res.ColorStateList; import android.content.res.TypedArray; import android.support.annotation.ColorInt; import android.support.annotation.StyleRes; @@ -33,6 +34,7 @@ import javax.inject.Singleton; public class AospThemeImpl implements Theme { private int colorIcon = -1; + private final ColorStateList colorIconStateList; private int colorIconSecondary = -1; private int colorPrimary = -1; private int colorPrimaryDark = -1; @@ -80,6 +82,7 @@ public class AospThemeImpl implements Theme { colorBackground = array.getColor(/* index= */ 7, /* defValue= */ -1); colorBackgroundFloating = array.getColor(/* index= */ 8, /* defValue= */ -1); colorIcon = array.getColor(/* index= */ 9, /* defValue= */ -1); + colorIconStateList = array.getColorStateList(/* index= */ 9); colorIconSecondary = array.getColor(/* index= */ 10, /* defValue= */ -1); colorTextOnUnthemedDarkBackground = array.getColor(/* index= */ 11, /* defValue= */ -1); colorIconOnUnthemedDarkBackground = array.getColor(/* index= */ 12, /* defValue= */ -1); @@ -125,6 +128,12 @@ public class AospThemeImpl implements Theme { return colorIcon; } + @Override + public ColorStateList getColorIconStateList() { + Assert.checkArgument(colorIconStateList != null); + return colorIconStateList; + } + @Override public @ColorInt int getColorIconSecondary() { Assert.checkArgument(colorIconSecondary != -1); diff --git a/java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml b/java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml index 4b5034023..142bb897b 100644 --- a/java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml +++ b/java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml @@ -56,7 +56,7 @@ ?android:attr/colorPrimary - @color/google_grey_400 + ?android:attr/textColorSecondary ?android:attr/textColorSecondary @android:color/white @android:color/white diff --git a/java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml b/java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml index db06df4bd..e3eefe69a 100644 --- a/java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml +++ b/java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml @@ -39,7 +39,7 @@