diff options
author | calderwoodra <calderwoodra@google.com> | 2018-02-21 10:40:41 -0800 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2018-02-22 21:11:38 +0000 |
commit | 99606aa5368e1eea30730a899aacdfdd7a5fd61a (patch) | |
tree | f74a98770cd3a4412e02baf129d0ad4e95404aa0 /java | |
parent | 9e3a39d9427525684d9c106587a5fa077b110812 (diff) |
Fixed some Dialer theming bugs in NUI.
- URL links are now blue
- Raised buttons are now blue w/ white text
- android nav bar is white
- call log actions/icons are the correct colors
- search bar hint text is the correct color
Bug: 72525324
Test: screenshot
PiperOrigin-RevId: 186484088
Change-Id: I1863a28e1ea9bf16863f42299afca319a6bdcc97
Diffstat (limited to 'java')
4 files changed, 50 insertions, 3 deletions
diff --git a/java/com/android/dialer/main/impl/AndroidManifest.xml b/java/com/android/dialer/main/impl/AndroidManifest.xml index 6b7475f97..972c9d929 100644 --- a/java/com/android/dialer/main/impl/AndroidManifest.xml +++ b/java/com/android/dialer/main/impl/AndroidManifest.xml @@ -29,7 +29,7 @@ android:launchMode="singleTask" android:name="com.android.dialer.main.impl.MainActivity" android:resizeableActivity="true" - android:theme="@style/NuiMainActivityTheme" + android:theme="@style/NuiActivityTheme" android:windowSoftInputMode="stateAlwaysHidden|adjustNothing"> diff --git a/java/com/android/dialer/main/impl/res/values-v27/styles.xml b/java/com/android/dialer/main/impl/res/values-v27/styles.xml new file mode 100644 index 000000000..c91cba245 --- /dev/null +++ b/java/com/android/dialer/main/impl/res/values-v27/styles.xml @@ -0,0 +1,26 @@ +<?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 + --> +<resources> + + <!-- Used on sdk 27 and above --> + <style name="NuiActivityTheme" parent="NuiActivityThemeBase"> + <!-- Used to change the navigation bar color --> + <item name="android:windowLightNavigationBar">true</item> + <item name="android:navigationBarColor">?android:windowBackground</item> + <item name="android:navigationBarDividerColor">#E0E0E0</item> + </style> +</resources>
\ No newline at end of file diff --git a/java/com/android/dialer/main/impl/res/values/styles.xml b/java/com/android/dialer/main/impl/res/values/styles.xml index 2865f2587..47fdbac93 100644 --- a/java/com/android/dialer/main/impl/res/values/styles.xml +++ b/java/com/android/dialer/main/impl/res/values/styles.xml @@ -15,14 +15,35 @@ ~ limitations under the License --> <resources> - <style name="NuiMainActivityTheme" parent="Theme.AppCompat.Light.NoActionBar"> + + <!-- Activities should use this theme as their style --> + <style name="NuiActivityTheme" parent="NuiActivityThemeBase"/> + + <!-- Used as a procy for values-v27/styles.xml --> + <style name="NuiActivityThemeBase" parent="Theme.AppCompat.Light.NoActionBar"> + <!-- App colors --> <item name="android:colorPrimary">@color/dialtacts_theme_color</item> <item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item> <item name="android:colorAccent">@color/dialer_secondary_color</item> + <!-- TODO(calderwoodra): figure out what this is used for, but I think it's for checkboxes --> + <item name="android:colorControlActivated">@color/dialer_theme_color</item> + + <!-- Text colors --> + <item name="android:textColorPrimary">@color/dialer_primary_text_color</item> + <item name="android:textColorSecondary">@color/dialer_secondary_text_color</item> + <item name="android:textColorLink">@color/dialer_theme_color</item> + + <!-- Themeing for material buttons and widgets --> + <item name="android:colorButtonNormal">@color/dialer_theme_color</item> + <item name="android:textAppearanceButton">@style/DialerButtonTextStyle</item> + <!-- Theme needed for DialpadFragment --> <item name="dialpad_style">@style/Dialpad.Light</item> + <!-- Custom theme for Alert Dialogs--> + <item name="android:alertDialogTheme">@style/AlertDialogTheme</item> + <!-- Required for actionmode/multiselect to render properly. --> <!-- TODO(calderwoodra): Check to see if we can remove this after NewVoicemailFragment launches --> <item name="actionModeStyle">@style/ActionModeStyle</item> diff --git a/java/com/android/dialer/theme/res/values/styles.xml b/java/com/android/dialer/theme/res/values/styles.xml index ac94d0687..d65d2af9c 100644 --- a/java/com/android/dialer/theme/res/values/styles.xml +++ b/java/com/android/dialer/theme/res/values/styles.xml @@ -45,7 +45,7 @@ </style> <style name="DialerButtonTextStyle" parent="@android:style/TextAppearance.Material.Widget.Button"> - <item name="android:textColor">#fff</item> + <item name="android:textColor">@color/dialer_primary_text_color_white</item> </style> <style name="DialerActionBarBaseStyle" |