diff options
author | wangqi <wangqi@google.com> | 2018-06-29 11:28:00 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-29 13:06:29 -0700 |
commit | 27d7f0a5a307c15dee5a048ec36ca256fa90d1bd (patch) | |
tree | 8f8db1dc8b219aa68e320a4d3adc4d99008f1aec /java/com/android/dialer/theme/base | |
parent | 3c185928853f663200826112de82987bc7d2c3d5 (diff) |
UI refresh for reply with sms bottom sheet.
Bug: 79878432
Test: manual
PiperOrigin-RevId: 202678951
Change-Id: I89cf9dc7ec78f2b6bd10889d50d3c9a139168bca
Diffstat (limited to 'java/com/android/dialer/theme/base')
4 files changed, 31 insertions, 2 deletions
diff --git a/java/com/android/dialer/theme/base/Theme.java b/java/com/android/dialer/theme/base/Theme.java index 2a9975b4b..3356a018c 100644 --- a/java/com/android/dialer/theme/base/Theme.java +++ b/java/com/android/dialer/theme/base/Theme.java @@ -44,6 +44,9 @@ public interface Theme { @StyleRes int getApplicationThemeRes(); + @StyleRes + int getBottomSheetStyleRes(); + Context getThemedContext(Context context); LayoutInflater getThemedLayoutInflator(LayoutInflater inflater); diff --git a/java/com/android/dialer/theme/base/impl/AospThemeImpl.java b/java/com/android/dialer/theme/base/impl/AospThemeImpl.java index 35dcef27c..cd1e16684 100644 --- a/java/com/android/dialer/theme/base/impl/AospThemeImpl.java +++ b/java/com/android/dialer/theme/base/impl/AospThemeImpl.java @@ -102,10 +102,25 @@ 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: - return R.style.Dialer_ThemeBase_NoActionBar; + case LIGHT_M2: + return R.style.DialerBottomSheetDialogStyle_Light; + case DARK: + return R.style.DialerBottomSheetDialogStyle_Dark; case UNKNOWN: default: throw Assert.createIllegalStateFailException("Theme hasn't been set yet."); 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 d2cc0fc9c..282ddfebb 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 @@ -64,4 +64,10 @@ <item name="colorIconOnUnthemedDarkBackground">@android:color/white</item> <item name="colorPrimary20pct">@color/dialer_dark_theme_color_20pct</item> </style> -</resources>
\ No newline at end of file + + <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> 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 69ecba41e..b0428ee46 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 @@ -84,6 +84,11 @@ <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. --> |