summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/main/impl/res/values
diff options
context:
space:
mode:
authorcalderwoodra <calderwoodra@google.com>2018-05-19 00:05:02 -0700
committerCopybara-Service <copybara-piper@google.com>2018-05-21 13:17:30 -0700
commit929539eb864822d669265b142bdcc49b6cf8ea6b (patch)
treefcaef3fac4068e3669ca5916f7a743d0d5e41bbb /java/com/android/dialer/main/impl/res/values
parentea7399a7c0c8a3832a6592aee0a0372c300b11f5 (diff)
Implement a global theme to be easily configured in Dialer.
deleted several colors and unified them across the app migrated several alert dialogs to support alert dialogs added many todos migrated several tests from GoogleRobolectricTestRunner to RobolectricTestRunner Because of the test migration: - moved dialpad theme attributes into dialpad/theme - moved incall ui theme attributes into incallui/theme Bug: 79883035 Test: tap PiperOrigin-RevId: 197246477 Change-Id: Ifc534793bc32757bbbf2007a7c40287c8d0817ad
Diffstat (limited to 'java/com/android/dialer/main/impl/res/values')
-rw-r--r--java/com/android/dialer/main/impl/res/values/strings.xml3
-rw-r--r--java/com/android/dialer/main/impl/res/values/styles.xml37
2 files changed, 7 insertions, 33 deletions
diff --git a/java/com/android/dialer/main/impl/res/values/strings.xml b/java/com/android/dialer/main/impl/res/values/strings.xml
index 121820383..cde78e66d 100644
--- a/java/com/android/dialer/main/impl/res/values/strings.xml
+++ b/java/com/android/dialer/main/impl/res/values/strings.xml
@@ -21,9 +21,6 @@
<!-- Title for the activity that dials the phone, when launched directly into the dialpad -->
<string name="dialpad_activity_title">Phone Keypad</string>
- <!-- The description text for the call log tab. -->
- <string name="main_call_history_tab_description" tools:ignore="UnusedResources">Call history</string>
-
<!-- Text for a toolbar button that shows the user their contacts [CHAR LIMIT=NONE] -->
<string name="search">@android:string/search_go</string>
<!-- A11y announcement to let users know a button will let them search for contacts and places [CHAR LIMIT=NONE] -->
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 387b1d79e..467cb5be0 100644
--- a/java/com/android/dialer/main/impl/res/values/styles.xml
+++ b/java/com/android/dialer/main/impl/res/values/styles.xml
@@ -17,47 +17,24 @@
<resources>
<!-- Activities should use this theme as their style -->
- <style name="NuiActivityTheme" parent="NuiActivityThemeBase"/>
+ <style name="MainActivityTheme" parent="MainActivityThemeBase"/>
<!-- 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>
-
+ <style name="MainActivityThemeBase" parent="Dialer.ThemeBase.NoActionBar">
<!-- Required for actionmode/multiselect to render properly. -->
- <!-- TODO(calderwoodra): Check to see if we can remove this after NewVoicemailFragment launches -->
- <item name="actionModeStyle">@style/NuiActionModeStyle</item>
+ <!-- TODO(a bug): Check to see if we can remove this after NewVoicemailFragment launches -->
+ <item name="actionModeStyle">@style/MainActionModeStyle</item>
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
</style>
<!-- Colors our actionbar in action mode to dialer theme color. -->
- <style name="NuiActionModeStyle" parent="@style/Widget.AppCompat.ActionMode">
- <item name="background">@color/dialer_theme_color</item>
+ <style name="MainActionModeStyle" parent="@style/Widget.AppCompat.ActionMode">
+ <item name="background">?android:attr/colorPrimary</item>
<item name="titleTextStyle">@style/ActionModeTitleTextStyle</item>
</style>
<!-- Colors our actionbar text in action mode to dialer white text color. -->
<style name="ActionModeTitleTextStyle" parent="@style/TextAppearance.AppCompat.Widget.ActionMode.Title">
- <item name="android:textColor">@color/dialer_primary_text_color_white</item>
+ <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
</style>
</resources>