diff options
author | wangqi <wangqi@google.com> | 2018-06-22 16:27:21 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2018-06-26 16:23:00 +0000 |
commit | b6c615dba7609e5134e960a92e723cfeadfbc589 (patch) | |
tree | 1e3bf129126f76a8c2ab7a2e7130591ce54c2d05 /java/com/android/dialer/theme | |
parent | 8ea0035f58ed06f2beb3a5d07c0ddb25814912f4 (diff) |
UI refresh for voice call screen.
Bug: 79878432
Test: screen diff tests
PiperOrigin-RevId: 201758864
Change-Id: Ib3ed6636df3d337cb2fa7c5f6d8f24da035cbd0c
Diffstat (limited to 'java/com/android/dialer/theme')
10 files changed, 40 insertions, 8 deletions
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); @@ -126,6 +129,12 @@ public class AospThemeImpl implements Theme { } @Override + public ColorStateList getColorIconStateList() { + Assert.checkArgument(colorIconStateList != null); + return colorIconStateList; + } + + @Override public @ColorInt int getColorIconSecondary() { Assert.checkArgument(colorIconSecondary != -1); return colorIconSecondary; 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 @@ <item name="colorControlActivated">?android:attr/colorPrimary</item> <!-- Dialer specific attributes. --> - <item name="colorIcon">@color/google_grey_400</item> + <item name="colorIcon">?android:attr/textColorSecondary</item> <item name="colorIconSecondary">?android:attr/textColorSecondary</item> <item name="colorTextOnUnthemedDarkBackground">@android:color/white</item> <item name="colorIconOnUnthemedDarkBackground">@android:color/white</item> 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 @@ <!-- Activities and Applications should inherit from one of the themes above. --> <style name="Dialer.ThemeBase"> <!-- These values should be used to color all backgrounds. --> - <item name="android:colorBackground">@color/dialer_background_color</item> + <item name="android:colorBackground">@android:color/white</item> <item name="android:colorBackgroundFloating">@android:color/white</item> <!-- These values should be used to set text color. --> @@ -61,7 +61,7 @@ <item name="colorControlActivated">?android:attr/colorPrimary</item> <!-- Dialer specific attributes. --> - <item name="colorIcon">@color/google_grey_700</item> + <item name="colorIcon">@color/dialer_icon_color</item> <item name="colorIconSecondary">@color/google_grey_400</item> <item name="colorTextOnUnthemedDarkBackground">@android:color/white</item> <item name="colorIconOnUnthemedDarkBackground">@android:color/white</item> diff --git a/java/com/android/dialer/theme/common/res/values/colors.xml b/java/com/android/dialer/theme/common/res/values/colors.xml index 6fea43665..770aa8c15 100644 --- a/java/com/android/dialer/theme/common/res/values/colors.xml +++ b/java/com/android/dialer/theme/common/res/values/colors.xml @@ -17,7 +17,7 @@ <!-- The colors in this file aren't configured at the theme level. --> <resources> <color name="dialer_call_green">#34A853</color> - <color name="dialer_end_call_button_color">#BD2A2A</color> + <color name="dialer_end_call_button_color">#D93025</color> <color name="dialer_divider_line_color">#D8D8D8</color> <color name="dialer_link_color">#2A56C6</color> <color name="dialer_snackbar_action_text_color">#4285F4</color> diff --git a/java/com/android/dialer/theme/hidden/res/color/dialer_dark_primary_text_color.xml b/java/com/android/dialer/theme/hidden/res/color/dialer_dark_primary_text_color.xml index 703e40bed..f14537cd5 100644 --- a/java/com/android/dialer/theme/hidden/res/color/dialer_dark_primary_text_color.xml +++ b/java/com/android/dialer/theme/hidden/res/color/dialer_dark_primary_text_color.xml @@ -17,5 +17,5 @@ <!-- Primary text color in the Phone app --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_enabled="false" android:color="@color/google_grey_700"/> - <item android:color="@color/google_grey_400"/> + <item android:color="@color/google_grey_100"/> </selector> diff --git a/java/com/android/dialer/theme/hidden/res/color/dialer_dark_secondary_text_color.xml b/java/com/android/dialer/theme/hidden/res/color/dialer_dark_secondary_text_color.xml index 486669f91..b94388a75 100644 --- a/java/com/android/dialer/theme/hidden/res/color/dialer_dark_secondary_text_color.xml +++ b/java/com/android/dialer/theme/hidden/res/color/dialer_dark_secondary_text_color.xml @@ -17,5 +17,5 @@ <!-- Secondary text color in the Phone app --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_enabled="false" android:color="@color/google_grey_700"/> - <item android:color="@color/google_grey_300"/> + <item android:color="@color/google_grey_400"/> </selector> diff --git a/java/com/android/dialer/theme/hidden/res/color/dialer_icon_color.xml b/java/com/android/dialer/theme/hidden/res/color/dialer_icon_color.xml new file mode 100644 index 000000000..594f82969 --- /dev/null +++ b/java/com/android/dialer/theme/hidden/res/color/dialer_icon_color.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2018 The Android Open Source Project + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License + --> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:color="@android:color/white" android:state_checked="true"/> + <item android:color="@color/google_grey_400" android:state_enabled="false"/> + <item android:color="@color/google_grey_700"/> +</selector> diff --git a/java/com/android/dialer/theme/hidden/res/values/colors_dialer_light.xml b/java/com/android/dialer/theme/hidden/res/values/colors_dialer_light.xml index 988aad78f..0ed8e7566 100644 --- a/java/com/android/dialer/theme/hidden/res/values/colors_dialer_light.xml +++ b/java/com/android/dialer/theme/hidden/res/values/colors_dialer_light.xml @@ -19,5 +19,4 @@ <color name="dialer_theme_color_20pct">#332A56C6</color> <color name="dialer_theme_color_dark">#1C3AA9</color> <color name="dialer_secondary_color">#F50057</color> - <color name="dialer_background_color">#FAFAFA</color> </resources> diff --git a/java/com/android/dialer/theme/hidden/res/values/styles.xml b/java/com/android/dialer/theme/hidden/res/values/styles.xml index 44a35f8a2..454384892 100644 --- a/java/com/android/dialer/theme/hidden/res/values/styles.xml +++ b/java/com/android/dialer/theme/hidden/res/values/styles.xml @@ -51,7 +51,6 @@ <!-- Used to style all Dialer's AlertDialogs. Every button is awarded this for free if the parent activity's theme extends from Dialer.ThemeBase(.NoActionBar) or doesn't specify a theme. --> <style name="AlertDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert"> - <item name="android:textColorPrimary">@color/dialer_primary_text_color</item> <!-- TODO(a bug): figure out why ?android:attr/colorPrimary doesn't work here --> <item name="android:colorAccent">@color/dialer_theme_color</item> <item name="colorAccent">@color/dialer_theme_color</item> |