diff options
Diffstat (limited to 'java/com/android/dialer/theme')
15 files changed, 26 insertions, 142 deletions
diff --git a/java/com/android/dialer/theme/base/Theme.java b/java/com/android/dialer/theme/base/Theme.java index 3356a018c..6e0d20a7a 100644 --- a/java/com/android/dialer/theme/base/Theme.java +++ b/java/com/android/dialer/theme/base/Theme.java @@ -17,7 +17,6 @@ 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; @@ -44,9 +43,6 @@ public interface Theme { @StyleRes int getApplicationThemeRes(); - @StyleRes - int getBottomSheetStyleRes(); - Context getThemedContext(Context context); LayoutInflater getThemedLayoutInflator(LayoutInflater inflater); @@ -54,8 +50,6 @@ 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 cd1e16684..c8f20c731 100644 --- a/java/com/android/dialer/theme/base/impl/AospThemeImpl.java +++ b/java/com/android/dialer/theme/base/impl/AospThemeImpl.java @@ -17,7 +17,6 @@ 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; @@ -34,7 +33,6 @@ 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; @@ -82,7 +80,6 @@ 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); @@ -102,25 +99,10 @@ public class AospThemeImpl implements Theme { @Override public @StyleRes int getApplicationThemeRes() { switch (getTheme()) { - case LIGHT: - case LIGHT_M2: - return R.style.Dialer_ThemeBase_NoActionBar; case DARK: return R.style.Dialer_Dark_ThemeBase_NoActionBar; - case UNKNOWN: - default: - throw Assert.createIllegalStateFailException("Theme hasn't been set yet."); - } - } - - @Override - public @StyleRes int getBottomSheetStyleRes() { - switch (getTheme()) { case LIGHT: - case LIGHT_M2: - return R.style.DialerBottomSheetDialogStyle_Light; - case DARK: - return R.style.DialerBottomSheetDialogStyle_Dark; + return R.style.Dialer_ThemeBase_NoActionBar; case UNKNOWN: default: throw Assert.createIllegalStateFailException("Theme hasn't been set yet."); @@ -144,12 +126,6 @@ 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 282ddfebb..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 @@ -32,8 +32,6 @@ <!-- Activities and Applications should inherit from one of the themes above. --> <style name="Dialer.Dark.ThemeBase"> - <item name="android:statusBarColor">@color/google_grey_900</item> - <!-- These values should be used to color all backgrounds. --> <item name="android:colorBackground">@color/google_grey_900</item> <item name="android:colorBackgroundFloating">@color/google_grey_800</item> @@ -51,8 +49,8 @@ <item name="colorPrimary">@color/dialer_dark_theme_color</item> <item name="android:colorPrimaryDark">@color/dialer_dark_theme_color_dark</item> <item name="colorPrimaryDark">@color/dialer_dark_theme_color_dark</item> - <item name="android:colorAccent">@color/dialer_dark_theme_color</item> - <item name="colorAccent">@color/dialer_dark_theme_color</item> + <item name="android:colorAccent">@color/dialer_dark_secondary_color</item> + <item name="colorAccent">@color/dialer_dark_secondary_color</item> <!-- Used to automatically style check/selected checkbox, switches and radio buttons --> <item name="colorControlActivated">?android:attr/colorPrimary</item> @@ -64,10 +62,4 @@ <item name="colorIconOnUnthemedDarkBackground">@android:color/white</item> <item name="colorPrimary20pct">@color/dialer_dark_theme_color_20pct</item> </style> - - <style name="DialerBottomSheetDialogStyle.Dark"> - <item name="android:textColorPrimary">@color/dialer_dark_primary_text_color</item> - <item name="android:colorBackgroundFloating">@color/google_grey_800</item> - </style> - -</resources> +</resources>
\ No newline at end of file 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 b0428ee46..db06df4bd 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 @@ -38,11 +38,8 @@ <!-- Activities and Applications should inherit from one of the themes above. --> <style name="Dialer.ThemeBase"> - <item name="android:windowLightStatusBar">true</item> - <item name="android:statusBarColor">@android:color/white</item> - <!-- These values should be used to color all backgrounds. --> - <item name="android:colorBackground">@android:color/white</item> + <item name="android:colorBackground">@color/dialer_background_color</item> <item name="android:colorBackgroundFloating">@android:color/white</item> <!-- These values should be used to set text color. --> @@ -57,14 +54,14 @@ <item name="colorPrimary">@color/dialer_theme_color</item> <item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item> <item name="colorPrimaryDark">@color/dialer_theme_color_dark</item> - <item name="android:colorAccent">@color/dialer_theme_color</item> - <item name="colorAccent">@color/dialer_theme_color</item> + <item name="android:colorAccent">@color/dialer_secondary_color</item> + <item name="colorAccent">@color/dialer_secondary_color</item> <!-- Used to automatically style check/selected checkbox, switches and radio buttons --> <item name="colorControlActivated">?android:attr/colorPrimary</item> <!-- Dialer specific attributes. --> - <item name="colorIcon">@color/dialer_icon_color</item> + <item name="colorIcon">@color/google_grey_700</item> <item name="colorIconSecondary">@color/google_grey_400</item> <item name="colorTextOnUnthemedDarkBackground">@android:color/white</item> <item name="colorIconOnUnthemedDarkBackground">@android:color/white</item> @@ -84,11 +81,6 @@ <item name="android:windowAnimationStyle">@android:style/Animation</item> </style> - <style name="DialerBottomSheetDialogStyle.Light"> - <item name="android:textColorPrimary">@color/dialer_primary_text_color</item> - <item name="android:colorBackgroundFloating">@android:color/white</item> - </style> - <!-- Deprecated: Use Toolbar instead of ActionBar. --> <!-- Used to style all Dialer's action bars. Every actionbar is awarded this for free if the parent activity's theme extends from Dialer.ThemeBase.ActionBar or doesn't specify a theme. --> diff --git a/java/com/android/dialer/theme/common/res/drawable/bottom_sheet_background.xml b/java/com/android/dialer/theme/common/res/drawable/bottom_sheet_background.xml deleted file mode 100644 index 558277d42..000000000 --- a/java/com/android/dialer/theme/common/res/drawable/bottom_sheet_background.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?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 - --> -<shape xmlns:android="http://schemas.android.com/apk/res/android" - android:shape="rectangle"> - <corners - android:topLeftRadius="8dp" - android:topRightRadius="8dp"/> - <solid android:color="?android:attr/colorBackgroundFloating"/> -</shape>
\ No newline at end of file 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 0af550fce..1831862b1 100644 --- a/java/com/android/dialer/theme/common/res/values/colors.xml +++ b/java/com/android/dialer/theme/common/res/values/colors.xml @@ -16,9 +16,9 @@ --> <!-- 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">#D93025</color> - <color name="dialer_divider_line_color">#DADCE0</color> + <color name="dialer_call_green">#00C853</color> + <color name="dialer_end_call_button_color">#BD2A2A</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> @@ -27,8 +27,8 @@ <color name="notification_action_dismiss">#A52714</color> <color name="notification_action_answer_video">#097138</color> - <color name="dialer_red">#EA4335</color> + <color name="dialer_red">#C53929</color> <!-- Legacy --> <color name="blue_grey_100">#CFD8DC</color> -</resources> +</resources>
\ No newline at end of file diff --git a/java/com/android/dialer/theme/common/res/values/dimens.xml b/java/com/android/dialer/theme/common/res/values/dimens.xml index fbc386ce3..88b8a0423 100644 --- a/java/com/android/dialer/theme/common/res/values/dimens.xml +++ b/java/com/android/dialer/theme/common/res/values/dimens.xml @@ -25,6 +25,8 @@ <dimen name="call_log_voicemail_transcription_text_size">14sp</dimen> <!-- Height of the call log actions section for each call log entry --> <dimen name="call_log_action_height">48dp</dimen> + <dimen name="call_log_day_group_padding_top">15dp</dimen> + <dimen name="call_log_day_group_padding_bottom">9dp</dimen> <!-- Height of the actionBar - this is 8dps bigger than the platform standard to give more room to the search box--> diff --git a/java/com/android/dialer/theme/common/res/values/styles.xml b/java/com/android/dialer/theme/common/res/values/styles.xml index 5db08f49a..2c6446ca1 100644 --- a/java/com/android/dialer/theme/common/res/values/styles.xml +++ b/java/com/android/dialer/theme/common/res/values/styles.xml @@ -20,14 +20,9 @@ <style name="CallLogCardStyle" parent="CardView"> <item name="android:layout_width">match_parent</item> <item name="android:layout_height">wrap_content</item> - <item name="android:layout_marginTop">4dp</item> - <item name="android:layout_marginBottom">4dp</item> - <item name="android:layout_marginStart">8dp</item> - <item name="android:layout_marginEnd">8dp</item> + <item name="android:layout_margin">4dp</item> <item name="android:baselineAligned">false</item> - <item name="cardElevation">0dp</item> - <item name="cardMaxElevation">6dp</item> - <item name="cardCornerRadius">8dp</item> + <item name="cardCornerRadius">2dp</item> <item name="cardBackgroundColor">?android:attr/colorBackgroundFloating</item> </style> @@ -36,13 +31,4 @@ <item name="android:layout_marginStart">20dp</item> <item name="android:paddingLeft">12dp</item> </style> - - <style name="DialerBottomSheetDialogStyle" parent="Theme.Design.BottomSheetDialog"> - <item name="android:windowBackground">@android:color/transparent</item> - <item name="bottomSheetStyle">@style/BottomSheetStyle</item> - </style> - - <style name="BottomSheetStyle" parent="Widget.Design.BottomSheet.Modal"> - <item name="android:background">@drawable/bottom_sheet_background</item> - </style> -</resources> +</resources>
\ No newline at end of file diff --git a/java/com/android/dialer/theme/common/res/values/text_styles.xml b/java/com/android/dialer/theme/common/res/values/text_styles.xml index 1f2d6c728..def5862d4 100644 --- a/java/com/android/dialer/theme/common/res/values/text_styles.xml +++ b/java/com/android/dialer/theme/common/res/values/text_styles.xml @@ -33,13 +33,7 @@ <style name="Dialer.TextAppearance.SubHeader" parent="TextAppearance.AppCompat"> <item name="android:textColor">?android:attr/textColorPrimary</item> - <item name="android:textSize">14sp</item> - <item name="android:fontFamily">sans-serif-medium</item> - </style> - - <style name="Dialer.TextAppearance.SubHeader2" parent="TextAppearance.AppCompat"> - <item name="android:textColor">?android:attr/textColorSecondary</item> - <item name="android:textSize">14sp</item> + <item name="android:textSize">16sp</item> <item name="android:fontFamily">sans-serif-medium</item> </style> @@ -49,12 +43,6 @@ <item name="android:fontFamily">sans-serif-regular</item> </style> - <style name="Dialer.TextAppearance.Primary2" parent="TextAppearance.AppCompat"> - <item name="android:textColor">?android:attr/textColorPrimary</item> - <item name="android:textSize">16sp</item> - <item name="android:fontFamily">sans-serif-regular</item> - </style> - <style name="Dialer.TextAppearance.Secondary" parent="TextAppearance.AppCompat"> <item name="android:textColor">?android:attr/textColorSecondary</item> <item name="android:textSize">14sp</item> @@ -93,11 +81,6 @@ <item name="android:maxLines">1</item> </style> - <style name="Dialer.TextAppearance.Primary2.Ellipsize"> - <item name="android:ellipsize">end</item> - <item name="android:maxLines">1</item> - </style> - <style name="Dialer.TextAppearance.Secondary.Ellipsize"> <item name="android:ellipsize">end</item> <item name="android:maxLines">1</item> 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 f14537cd5..703e40bed 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_100"/> + <item android:color="@color/google_grey_400"/> </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 b94388a75..486669f91 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_400"/> + <item android:color="@color/google_grey_300"/> </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 deleted file mode 100644 index 594f82969..000000000 --- a/java/com/android/dialer/theme/hidden/res/color/dialer_icon_color.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?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_dark.xml b/java/com/android/dialer/theme/hidden/res/values/colors_dialer_dark.xml index 41c5fd1c5..e48474e9f 100644 --- a/java/com/android/dialer/theme/hidden/res/values/colors_dialer_dark.xml +++ b/java/com/android/dialer/theme/hidden/res/values/colors_dialer_dark.xml @@ -18,4 +18,5 @@ <color name="dialer_dark_theme_color">#5195EA</color> <color name="dialer_dark_theme_color_20pct">#335195EA</color> <color name="dialer_dark_theme_color_dark">#2374CE</color> + <color name="dialer_dark_secondary_color">#5195EA</color> </resources> 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 ec2f2629e..988aad78f 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 @@ -15,7 +15,9 @@ --> <resources> <!-- Essential theme colors --> - <color name="dialer_theme_color">@color/google_blue_600</color> + <color name="dialer_theme_color">#2A56C6</color> <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 454384892..44a35f8a2 100644 --- a/java/com/android/dialer/theme/hidden/res/values/styles.xml +++ b/java/com/android/dialer/theme/hidden/res/values/styles.xml @@ -51,6 +51,7 @@ <!-- 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> |