Dialer: dialer goes dynamic color
Change-Id: I185b9b32ff864b69efade08d5980eefcc6366adc
diff --git a/java/com/android/contacts/common/list/ViewPagerTabStrip.java b/java/com/android/contacts/common/list/ViewPagerTabStrip.java
index 7a9e506..a702504 100644
--- a/java/com/android/contacts/common/list/ViewPagerTabStrip.java
+++ b/java/com/android/contacts/common/list/ViewPagerTabStrip.java
@@ -49,7 +49,7 @@
mSelectedUnderlinePaint = new Paint();
mSelectedUnderlinePaint.setColor(underlineColor);
- setBackgroundColor(backgroundColor);
+ //setBackgroundColor(backgroundColor);
setWillNotDraw(false);
}
diff --git a/java/com/android/dialer/app/calllog/CallLogActivity.java b/java/com/android/dialer/app/calllog/CallLogActivity.java
index fdfb3ab..a801538 100644
--- a/java/com/android/dialer/app/calllog/CallLogActivity.java
+++ b/java/com/android/dialer/app/calllog/CallLogActivity.java
@@ -65,7 +65,7 @@
super.onCreate(savedInstanceState);
setContentView(R.layout.call_log_activity);
- getWindow().setBackgroundDrawable(null);
+ //getWindow().setBackgroundDrawable(null);
final ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayShowHomeEnabled(true);
diff --git a/java/com/android/dialer/app/res/layout/call_log_activity.xml b/java/com/android/dialer/app/res/layout/call_log_activity.xml
index 4b3c1e0..acbc56e 100644
--- a/java/com/android/dialer/app/res/layout/call_log_activity.xml
+++ b/java/com/android/dialer/app/res/layout/call_log_activity.xml
@@ -28,7 +28,7 @@
android:layout_gravity="top"
android:elevation="@dimen/tab_elevation"
android:orientation="horizontal"
- android:textAllCaps="true"/>
+ android:textAllCaps="false"/>
<android.support.v4.view.ViewPager
android:id="@+id/call_log_pager"
android:layout_width="match_parent"
diff --git a/java/com/android/dialer/app/res/layout/lists_fragment.xml b/java/com/android/dialer/app/res/layout/lists_fragment.xml
index 6be1fe0..88ba950 100644
--- a/java/com/android/dialer/app/res/layout/lists_fragment.xml
+++ b/java/com/android/dialer/app/res/layout/lists_fragment.xml
@@ -43,7 +43,7 @@
android:layout_gravity="top"
android:elevation="@dimen/tab_elevation"
android:orientation="horizontal"
- android:textAllCaps="true"/>
+ android:textAllCaps="false"/>
<com.android.dialer.app.list.DialerViewPager
android:id="@+id/lists_pager"
diff --git a/java/com/android/dialer/main/impl/toolbar/res/drawable-night/search_bar_background.xml b/java/com/android/dialer/app/res/values-night-v31/colors.xml
similarity index 66%
copy from java/com/android/dialer/main/impl/toolbar/res/drawable-night/search_bar_background.xml
copy to java/com/android/dialer/app/res/values-night-v31/colors.xml
index e4e51a7..d2dcb74 100644
--- a/java/com/android/dialer/main/impl/toolbar/res/drawable-night/search_bar_background.xml
+++ b/java/com/android/dialer/app/res/values-night-v31/colors.xml
@@ -1,6 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
<!--
- ~ Copyright (C) 2018 The Android Open Source Project
+ ~ Copyright (C) 2012 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.
@@ -13,8 +12,10 @@
~ 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">
- <solid android:color="@*android:color/primary_device_default_settings"/>
-</shape>
+-->
+
+<resources>
+
+ <color name="ic_launcher_background_color">@android:color/system_accent1_600</color>
+
+</resources>
diff --git a/java/com/android/dialer/main/impl/toolbar/res/drawable-night/search_bar_background_rounded_corners.xml b/java/com/android/dialer/app/res/values-night-v31/styles.xml
similarity index 60%
copy from java/com/android/dialer/main/impl/toolbar/res/drawable-night/search_bar_background_rounded_corners.xml
copy to java/com/android/dialer/app/res/values-night-v31/styles.xml
index 1ed81e0..60769d4 100644
--- a/java/com/android/dialer/main/impl/toolbar/res/drawable-night/search_bar_background_rounded_corners.xml
+++ b/java/com/android/dialer/app/res/values-night-v31/styles.xml
@@ -14,8 +14,15 @@
~ 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">
- <solid android:color="@*android:color/primary_device_default_settings"/>
- <corners android:radius="@dimen/search_bar_corner_radius"/>
-</shape>
+<resources>
+
+ <style name="DialtactsActionBarTabTextStyle"
+ parent="android:style/Widget.Material.ActionBar.TabText">
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ <item name="android:textSize">@dimen/tab_text_size</item>
+ <item name="android:fontFamily">"sans-serif-medium"</item>
+ </style>
+
+ <style name="DialtactsTheme" parent="Dialer.ThemeBase.ActionBar">
+ </style>
+</resources>
diff --git a/java/com/android/dialer/app/res/values-night/colors.xml b/java/com/android/dialer/app/res/values-night/colors.xml
index ae050c6..a6118e8 100644
--- a/java/com/android/dialer/app/res/values-night/colors.xml
+++ b/java/com/android/dialer/app/res/values-night/colors.xml
@@ -23,5 +23,4 @@
<!-- Colors for blocked numbers list -->
<color name="blocked_number_block_color">#F44336</color>
- <color name="ic_launcher_background">@color/dialer_theme_color</color>
</resources>
diff --git a/java/com/android/dialer/main/impl/toolbar/res/drawable-night/search_bar_background.xml b/java/com/android/dialer/app/res/values-v31/colors.xml
similarity index 66%
copy from java/com/android/dialer/main/impl/toolbar/res/drawable-night/search_bar_background.xml
copy to java/com/android/dialer/app/res/values-v31/colors.xml
index e4e51a7..d2dcb74 100644
--- a/java/com/android/dialer/main/impl/toolbar/res/drawable-night/search_bar_background.xml
+++ b/java/com/android/dialer/app/res/values-v31/colors.xml
@@ -1,6 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
<!--
- ~ Copyright (C) 2018 The Android Open Source Project
+ ~ Copyright (C) 2012 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.
@@ -13,8 +12,10 @@
~ 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">
- <solid android:color="@*android:color/primary_device_default_settings"/>
-</shape>
+-->
+
+<resources>
+
+ <color name="ic_launcher_background_color">@android:color/system_accent1_600</color>
+
+</resources>
diff --git a/java/com/android/dialer/main/impl/toolbar/res/drawable-night/search_bar_background_rounded_corners.xml b/java/com/android/dialer/app/res/values-v31/styles.xml
similarity index 60%
copy from java/com/android/dialer/main/impl/toolbar/res/drawable-night/search_bar_background_rounded_corners.xml
copy to java/com/android/dialer/app/res/values-v31/styles.xml
index 1ed81e0..52e4574 100644
--- a/java/com/android/dialer/main/impl/toolbar/res/drawable-night/search_bar_background_rounded_corners.xml
+++ b/java/com/android/dialer/app/res/values-v31/styles.xml
@@ -14,8 +14,15 @@
~ 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">
- <solid android:color="@*android:color/primary_device_default_settings"/>
- <corners android:radius="@dimen/search_bar_corner_radius"/>
-</shape>
+<resources>
+
+ <style name="DialtactsActionBarTabTextStyle"
+ parent="android:style/Widget.Material.Light.ActionBar.TabText">
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ <item name="android:textSize">@dimen/tab_text_size</item>
+ <item name="android:fontFamily">"sans-serif-medium"</item>
+ </style>
+
+ <style name="DialtactsTheme" parent="Dialer.ThemeBase.ActionBar">
+ </style>
+</resources>
diff --git a/java/com/android/dialer/app/res/values/colors.xml b/java/com/android/dialer/app/res/values/colors.xml
index acb995f..9dcb0b6 100644
--- a/java/com/android/dialer/app/res/values/colors.xml
+++ b/java/com/android/dialer/app/res/values/colors.xml
@@ -24,5 +24,7 @@
<!-- Colors for blocked numbers list -->
<color name="blocked_number_block_color">#F44336</color>
- <color name="ic_launcher_background">@color/dialer_theme_color</color>
+ <color name="ic_launcher_background_color">@color/dialer_theme_color</color>
+ <color name="ic_launcher_background">@color/ic_launcher_background_color</color>
+
</resources>
diff --git a/java/com/android/dialer/main/impl/res/layout/main_activity.xml b/java/com/android/dialer/main/impl/res/layout/main_activity.xml
index 25db637..b13164c 100644
--- a/java/com/android/dialer/main/impl/res/layout/main_activity.xml
+++ b/java/com/android/dialer/main/impl/res/layout/main_activity.xml
@@ -62,7 +62,8 @@
android:layout_gravity="end|bottom"
android:src="@drawable/quantum_ic_dialpad_white_24"
android:contentDescription="@string/dialpad_button_content_description"
- app:backgroundTint="?android:attr/colorAccent"/>
+ app:backgroundTint="?android:attr/colorPrimary"
+ app:tint="@color/dialpad_button_foreground_tint"/>
<include android:id="@+id/promotion_bottom_sheet"
layout="@layout/promotion_bottom_sheet"/>
diff --git a/java/com/android/dialer/main/impl/res/values-night-v27/styles.xml b/java/com/android/dialer/main/impl/res/values-night-v27/styles.xml
new file mode 100644
index 0000000..36b1e55
--- /dev/null
+++ b/java/com/android/dialer/main/impl/res/values-night-v27/styles.xml
@@ -0,0 +1,37 @@
+<?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 -->
+ <!-- TODO(a bug): refactor into dialer/theme -->
+ <style name="MainActivityTheme" parent="MainActivityThemeBase">
+ <item name="android:windowLightStatusBar">false</item>
+ <item name="android:windowLightNavigationBar">false</item>
+ <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:navigationBarColor">@android:color/transparent</item>
+
+ </style>
+
+ <!-- Used on sdk 27 and above -->
+ <!-- TODO(a bug): refactor into dialer/theme -->
+ <style name="MainActivityTheme.Dark" parent="MainActivityThemeBase.Dark">
+ <item name="android:windowLightStatusBar">false</item>
+ <item name="android:windowLightNavigationBar">false</item>
+ <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:navigationBarColor">@android:color/transparent</item>
+ </style>
+</resources>
\ No newline at end of file
diff --git a/java/com/android/dialer/main/impl/res/values-night-v31/colors.xml b/java/com/android/dialer/main/impl/res/values-night-v31/colors.xml
new file mode 100644
index 0000000..eab68a0
--- /dev/null
+++ b/java/com/android/dialer/main/impl/res/values-night-v31/colors.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="colorPrimary">@android:color/system_accent1_100</color>
+ <color name="dialer_theme_color">@color/colorPrimary</color>
+ <color name="dialer_theme_color_20pct">@android:color/system_accent1_800</color>
+ <color name="dialer_theme_color_dark">@color/colorPrimary</color>
+ <color name="dialer_secondary_color">@color/colorPrimary</color>
+ <color name="dialer_background_color">@android:color/system_neutral1_900</color>
+ <color name="dialer_background_floating_color">@android:color/system_neutral1_800</color>
+ <color name="search_bar_background_color">@android:color/system_neutral1_800</color>
+ <color name="dialpad_button_foreground_tint">@android:color/black</color>
+</resources>
\ No newline at end of file
diff --git a/java/com/android/dialer/main/impl/res/values-night-v31/styles.xml b/java/com/android/dialer/main/impl/res/values-night-v31/styles.xml
new file mode 100644
index 0000000..5c4ab1d
--- /dev/null
+++ b/java/com/android/dialer/main/impl/res/values-night-v31/styles.xml
@@ -0,0 +1,74 @@
+<?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>
+ <style name="Dialer.ThemeBase.ActionBar">
+ <item name="android:windowLightStatusBar">false</item>
+ <item name="android:windowLightNavigationBar">false</item>
+ <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:navigationBarColor">@android:color/transparent</item>
+
+ <!-- These are used to style all actionbars in Dialer. These aren't needed in Dialer.ThemeBase.NoActionBar -->
+ <item name="actionBarStyle">@style/DialerActionBarBaseStyle</item>
+ <item name="actionBarSize">@dimen/action_bar_height</item>
+
+ <!-- Pulled from Theme.AppCompat.Light.DarkActionbar-->
+ <item name="actionBarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item>
+ <item name="actionBarWidgetTheme">@null</item>
+ <item name="actionBarTheme">@style/DialerActionBarBaseTheme</item>
+ <item name="listChoiceBackgroundIndicator">@drawable/abc_list_selector_holo_dark</item>
+ </style>
+
+ <style name="Dialer.ThemeBase">
+ <item name="android:windowLightStatusBar">false</item>
+ <item name="android:windowLightNavigationBar">false</item>
+ <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:navigationBarColor">@android:color/transparent</item>
+
+ <!-- These values should be used to color all backgrounds. -->
+ <item name="android:colorBackground">@color/dialer_background_color</item>
+ <item name="android:colorBackgroundFloating">@color/dialer_background_floating_color</item>
+
+ <!-- These values should be used to set text color. -->
+ <item name="android:textColorPrimary">@color/dialer_primary_text_color</item>
+ <item name="android:textColorSecondary">@color/dialer_secondary_text_color</item>
+ <item name="android:textColorPrimaryInverse">@color/google_grey_300</item>
+ <item name="android:textColorSecondaryInverse">@color/google_grey_400</item>
+ <item name="android:textColorHint">@color/google_grey_600</item>
+
+ <!-- These will be automatically used to color most Appcompat/Material widgets. -->
+ <item name="android:colorPrimary">@color/dialer_theme_color</item>
+ <item name="colorPrimary">@color/dialer_theme_color</item>
+ <item name="android:colorPrimaryDark">@color/dialer_theme_color</item>
+ <item name="colorPrimaryDark">@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/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>
+ <item name="colorMobileTerminatingChatText">@color/google_grey_900</item>
+ <item name="colorMobileTerminatingChatBackground">@color/google_grey_100</item>
+ <item name="colorMobileOriginatingChatText">@color/google_blue_900</item>
+ <item name="colorMobileOriginatingChatBackground">@color/google_blue_100</item>
+ <item name="colorPrimary20pct">@color/dialer_theme_color_20pct</item>
+ </style>
+</resources>
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
index 261012e..7fd220f 100644
--- a/java/com/android/dialer/main/impl/res/values-v27/styles.xml
+++ b/java/com/android/dialer/main/impl/res/values-v27/styles.xml
@@ -19,18 +19,19 @@
<!-- Used on sdk 27 and above -->
<!-- TODO(a bug): refactor into dialer/theme -->
<style name="MainActivityTheme" parent="MainActivityThemeBase">
- <!-- Used to change the navigation bar color -->
+ <item name="android:windowLightStatusBar">true</item>
<item name="android:windowLightNavigationBar">true</item>
- <item name="android:navigationBarColor">?android:attr/colorBackgroundFloating</item>
- <item name="android:navigationBarDividerColor">#E0E0E0</item>
+ <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:navigationBarColor">@android:color/transparent</item>
+
</style>
<!-- Used on sdk 27 and above -->
<!-- TODO(a bug): refactor into dialer/theme -->
<style name="MainActivityTheme.Dark" parent="MainActivityThemeBase.Dark">
- <!-- Used to change the navigation bar color -->
+ <item name="android:windowLightStatusBar">true</item>
<item name="android:windowLightNavigationBar">true</item>
- <item name="android:navigationBarColor">?android:attr/colorBackgroundFloating</item>
- <item name="android:navigationBarDividerColor">#E0E0E0</item>
+ <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:navigationBarColor">@android:color/transparent</item>
</style>
</resources>
\ No newline at end of file
diff --git a/java/com/android/dialer/main/impl/res/values-v31/colors.xml b/java/com/android/dialer/main/impl/res/values-v31/colors.xml
new file mode 100644
index 0000000..ee9dd3c
--- /dev/null
+++ b/java/com/android/dialer/main/impl/res/values-v31/colors.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="colorPrimary">@android:color/system_accent1_600</color>
+ <color name="dialer_theme_color">@color/colorPrimary</color>
+ <color name="dialer_theme_color_20pct">@android:color/system_accent1_200</color>
+ <color name="dialer_theme_color_dark">@color/colorPrimary</color>
+ <color name="dialer_secondary_color">@color/colorPrimary</color>
+ <color name="dialer_background_color">@android:color/system_neutral1_10</color>
+ <color name="dialer_background_floating_color">@android:color/system_neutral1_50</color>
+ <color name="search_bar_background_color">@android:color/system_neutral1_50</color>
+ <color name="dialpad_button_foreground_tint">@android:color/white</color>
+</resources>
\ No newline at end of file
diff --git a/java/com/android/dialer/main/impl/res/values-v31/styles.xml b/java/com/android/dialer/main/impl/res/values-v31/styles.xml
new file mode 100644
index 0000000..36218c0
--- /dev/null
+++ b/java/com/android/dialer/main/impl/res/values-v31/styles.xml
@@ -0,0 +1,73 @@
+<?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>
+ <style name="Dialer.ThemeBase.ActionBar">
+ <item name="android:windowLightStatusBar">true</item>
+ <item name="android:windowLightNavigationBar">true</item>
+ <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:navigationBarColor">@android:color/transparent</item>
+ <!-- These are used to style all actionbars in Dialer. These aren't needed in Dialer.ThemeBase.NoActionBar -->
+ <item name="actionBarStyle">@style/DialerActionBarBaseStyle</item>
+ <item name="actionBarSize">@dimen/action_bar_height</item>
+
+ <!-- Pulled from Theme.AppCompat.Light.DarkActionbar-->
+ <item name="actionBarPopupTheme">@style/ThemeOverlay.AppCompat.Light</item>
+ <item name="actionBarWidgetTheme">@null</item>
+ <item name="actionBarTheme">@style/DialerActionBarBaseTheme</item>
+ <item name="listChoiceBackgroundIndicator">@drawable/abc_list_selector_holo_dark</item>
+ </style>
+
+ <style name="Dialer.ThemeBase">
+ <item name="android:windowLightStatusBar">true</item>
+ <item name="android:windowLightNavigationBar">true</item>
+ <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:navigationBarColor">@android:color/transparent</item>
+
+ <!-- These values should be used to color all backgrounds. -->
+ <item name="android:colorBackground">@color/dialer_background_color</item>
+ <item name="android:colorBackgroundFloating">@color/dialer_background_floating_color</item>
+
+ <!-- These values should be used to set text color. -->
+ <item name="android:textColorPrimary">@color/dialer_primary_text_color</item>
+ <item name="android:textColorSecondary">@color/dialer_secondary_text_color</item>
+ <item name="android:textColorPrimaryInverse">@color/google_grey_300</item>
+ <item name="android:textColorSecondaryInverse">@color/google_grey_400</item>
+ <item name="android:textColorHint">@color/google_grey_600</item>
+
+ <!-- These will be automatically used to color most Appcompat/Material widgets. -->
+ <item name="android:colorPrimary">@color/dialer_theme_color</item>
+ <item name="colorPrimary">@color/dialer_theme_color</item>
+ <item name="android:colorPrimaryDark">@color/dialer_theme_color</item>
+ <item name="colorPrimaryDark">@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/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>
+ <item name="colorMobileTerminatingChatText">@color/google_grey_900</item>
+ <item name="colorMobileTerminatingChatBackground">@color/google_grey_100</item>
+ <item name="colorMobileOriginatingChatText">@color/google_blue_900</item>
+ <item name="colorMobileOriginatingChatBackground">@color/google_blue_100</item>
+ <item name="colorPrimary20pct">@color/dialer_theme_color_20pct</item>
+ </style>
+</resources>
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 25f247e..9c8693d 100644
--- a/java/com/android/dialer/main/impl/res/values/styles.xml
+++ b/java/com/android/dialer/main/impl/res/values/styles.xml
@@ -48,4 +48,6 @@
<style name="ActionModeTitleTextStyle" parent="@style/TextAppearance.AppCompat.Widget.ActionMode.Title">
<item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
+
+ <color name="dialpad_button_foreground_tint">@android:color/white</color>
</resources>
diff --git a/java/com/android/dialer/main/impl/toolbar/res/drawable-night/search_bar_background.xml b/java/com/android/dialer/main/impl/toolbar/res/drawable-v31/search_bar_background.xml
similarity index 91%
rename from java/com/android/dialer/main/impl/toolbar/res/drawable-night/search_bar_background.xml
rename to java/com/android/dialer/main/impl/toolbar/res/drawable-v31/search_bar_background.xml
index e4e51a7..8bc21c4 100644
--- a/java/com/android/dialer/main/impl/toolbar/res/drawable-night/search_bar_background.xml
+++ b/java/com/android/dialer/main/impl/toolbar/res/drawable-v31/search_bar_background.xml
@@ -16,5 +16,5 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
- <solid android:color="@*android:color/primary_device_default_settings"/>
+ <solid android:color="?android:attr/colorBackground"/>
</shape>
diff --git a/java/com/android/dialer/main/impl/toolbar/res/drawable-night/search_bar_background_rounded_corners.xml b/java/com/android/dialer/main/impl/toolbar/res/drawable-v31/search_bar_background_rounded_corners.xml
similarity index 91%
rename from java/com/android/dialer/main/impl/toolbar/res/drawable-night/search_bar_background_rounded_corners.xml
rename to java/com/android/dialer/main/impl/toolbar/res/drawable-v31/search_bar_background_rounded_corners.xml
index 1ed81e0..37404f3 100644
--- a/java/com/android/dialer/main/impl/toolbar/res/drawable-night/search_bar_background_rounded_corners.xml
+++ b/java/com/android/dialer/main/impl/toolbar/res/drawable-v31/search_bar_background_rounded_corners.xml
@@ -16,6 +16,6 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
- <solid android:color="@*android:color/primary_device_default_settings"/>
+ <solid android:color="@color/search_bar_background_color"/>
<corners android:radius="@dimen/search_bar_corner_radius"/>
</shape>
diff --git a/java/com/android/dialer/main/impl/toolbar/res/layout/toolbar_layout.xml b/java/com/android/dialer/main/impl/toolbar/res/layout/toolbar_layout.xml
index 049cf2e..fb85d50 100644
--- a/java/com/android/dialer/main/impl/toolbar/res/layout/toolbar_layout.xml
+++ b/java/com/android/dialer/main/impl/toolbar/res/layout/toolbar_layout.xml
@@ -18,7 +18,6 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="@dimen/expanded_search_bar_height"
- android:background="?android:attr/colorPrimary"
app:contentInsetEnd="0dp"
app:contentInsetStart="0dp">
<FrameLayout
@@ -30,7 +29,6 @@
android:layout_height="wrap_content"
android:layout_margin="@dimen/search_bar_margin"
android:background="@drawable/search_bar_background_rounded_corners"
- android:elevation="4dp"
android:minHeight="@dimen/collapsed_search_bar_height">
<RelativeLayout
diff --git a/java/com/android/dialer/main/impl/toolbar/res/values/dimens.xml b/java/com/android/dialer/main/impl/toolbar/res/values/dimens.xml
index 247485e..956819c 100644
--- a/java/com/android/dialer/main/impl/toolbar/res/values/dimens.xml
+++ b/java/com/android/dialer/main/impl/toolbar/res/values/dimens.xml
@@ -15,9 +15,9 @@
~ limitations under the License
-->
<resources>
- <dimen name="search_bar_margin">8dp</dimen>
+ <dimen name="search_bar_margin">16dp</dimen>
<dimen name="collapsed_search_bar_height">48dp</dimen>
<!-- collapsed + margin * 2 -->
- <dimen name="expanded_search_bar_height">64dp</dimen>
- <dimen name="search_bar_corner_radius">@*android:dimen/config_dialogCornerRadius</dimen>
+ <dimen name="expanded_search_bar_height">80dp</dimen>
+ <dimen name="search_bar_corner_radius">24dp</dimen>
</resources>
diff --git a/java/com/android/dialer/theme/base/res/values-night-v31/styles.xml b/java/com/android/dialer/theme/base/res/values-night-v31/styles.xml
new file mode 100644
index 0000000..be8ee71
--- /dev/null
+++ b/java/com/android/dialer/theme/base/res/values-night-v31/styles.xml
@@ -0,0 +1,40 @@
+<?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>
+ <style name="DialerActionBarBaseStyle"
+ parent="@style/Widget.AppCompat.ActionBar.Solid">
+ <item name="android:background">@android:color/transparent</item>
+ <item name="background">@android:color/transparent</item>
+ </style>
+
+ <style name="DialerActionBarBaseTheme"
+ parent="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
+ </style>
+
+ <style name="SettingsStyle" parent="Dialer.ThemeBase.ActionBar">
+ <!-- Setting text. -->
+ <item name="android:textColorPrimary">@color/settings_text_color_primary</item>
+ <!-- Setting description. -->
+ <item name="android:textColorSecondary">@color/settings_text_color_secondary</item>
+ <item name="android:windowBackground">?android:attr/colorBackground</item>
+ <item name="android:colorAccent">?android:attr/colorPrimary</item>
+ <item name="android:windowLightStatusBar">false</item>
+ <item name="android:windowLightNavigationBar">false</item>
+ <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:navigationBarColor">@android:color/transparent</item>
+ </style>
+</resources>
diff --git a/java/com/android/dialer/theme/base/res/values-v31/styles.xml b/java/com/android/dialer/theme/base/res/values-v31/styles.xml
new file mode 100644
index 0000000..861b133
--- /dev/null
+++ b/java/com/android/dialer/theme/base/res/values-v31/styles.xml
@@ -0,0 +1,40 @@
+<?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>
+ <style name="DialerActionBarBaseStyle"
+ parent="@style/Widget.AppCompat.Light.ActionBar.Solid">
+ <item name="android:background">@android:color/transparent</item>
+ <item name="background">@android:color/transparent</item>
+ </style>
+
+ <style name="DialerActionBarBaseTheme"
+ parent="@style/ThemeOverlay.AppCompat.ActionBar">
+ </style>
+
+ <style name="SettingsStyle" parent="Dialer.ThemeBase.ActionBar">
+ <!-- Setting text. -->
+ <item name="android:textColorPrimary">@color/settings_text_color_primary</item>
+ <!-- Setting description. -->
+ <item name="android:textColorSecondary">@color/settings_text_color_secondary</item>
+ <item name="android:windowBackground">?android:attr/colorBackground</item>
+ <item name="android:colorAccent">?android:attr/colorPrimary</item>
+ <item name="android:windowLightStatusBar">true</item>
+ <item name="android:windowLightNavigationBar">true</item>
+ <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:navigationBarColor">@android:color/transparent</item>
+ </style>
+</resources>
diff --git a/java/com/android/dialer/theme/common/res/values-night-v31/styles.xml b/java/com/android/dialer/theme/common/res/values-night-v31/styles.xml
new file mode 100644
index 0000000..6e311b9
--- /dev/null
+++ b/java/com/android/dialer/theme/common/res/values-night-v31/styles.xml
@@ -0,0 +1,31 @@
+<?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>
+ <!-- TODO(calderwoodra): Delete this once new call log and new voicemail ship. -->
+ <!-- Ideally we would make a callLogCardStyle attribute but we don't want to expand dialer/app -->
+ <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_margin">4dp</item>
+ <item name="android:baselineAligned">false</item>
+ <item name="cardCornerRadius">8dp</item>
+ <item name="cardBackgroundColor">?android:attr/colorBackgroundFloating</item>
+ <item name="contentPadding">6dp</item>
+ <item name="cardElevation">0dp</item>
+ </style>
+
+</resources>
diff --git a/java/com/android/dialer/theme/common/res/values-v31/styles.xml b/java/com/android/dialer/theme/common/res/values-v31/styles.xml
new file mode 100644
index 0000000..0739744
--- /dev/null
+++ b/java/com/android/dialer/theme/common/res/values-v31/styles.xml
@@ -0,0 +1,31 @@
+<?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>
+ <!-- TODO(calderwoodra): Delete this once new call log and new voicemail ship. -->
+ <!-- Ideally we would make a callLogCardStyle attribute but we don't want to expand dialer/app -->
+ <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_margin">4dp</item>
+ <item name="android:baselineAligned">false</item>
+ <item name="cardCornerRadius">8dp</item>
+ <item name="cardBackgroundColor">?android:attr/colorBackgroundFloating</item>
+ <item name="contentPadding">6dp</item>
+ <item name="cardElevation">0dp</item>
+ </style>
+
+</resources>
\ No newline at end of file