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
diff --git a/java/com/android/contacts/common/list/ViewPagerTabStrip.java b/java/com/android/contacts/common/list/ViewPagerTabStrip.java
index 969a6d3..8835631 100644
--- a/java/com/android/contacts/common/list/ViewPagerTabStrip.java
+++ b/java/com/android/contacts/common/list/ViewPagerTabStrip.java
@@ -24,6 +24,7 @@
import android.view.View;
import android.widget.LinearLayout;
import com.android.contacts.common.R;
+import com.android.dialer.theme.ThemeUtil;
public class ViewPagerTabStrip extends LinearLayout {
@@ -42,8 +43,8 @@
final Resources res = context.getResources();
mSelectedUnderlineThickness = res.getDimensionPixelSize(R.dimen.tab_selected_underline_height);
- int underlineColor = res.getColor(R.color.tab_selected_underline_color);
- int backgroundColor = res.getColor(R.color.contactscommon_actionbar_background_color);
+ int underlineColor = ThemeUtil.getColorAccent();
+ int backgroundColor = ThemeUtil.getColorPrimary();
mSelectedUnderlinePaint = new Paint();
mSelectedUnderlinePaint.setColor(underlineColor);
diff --git a/java/com/android/contacts/common/res/drawable/ic_scroll_handle_pressed.xml b/java/com/android/contacts/common/res/drawable/ic_scroll_handle_pressed.xml
index 4838de5..c9b93d9 100644
--- a/java/com/android/contacts/common/res/drawable/ic_scroll_handle_pressed.xml
+++ b/java/com/android/contacts/common/res/drawable/ic_scroll_handle_pressed.xml
@@ -17,4 +17,4 @@
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/ic_scroll_handle"
- android:tint="@color/dialtacts_theme_color"/>
\ No newline at end of file
+ android:tint="?android:attr/colorPrimary"/>
\ No newline at end of file
diff --git a/java/com/android/contacts/common/res/drawable/searchedittext_custom_cursor.xml b/java/com/android/contacts/common/res/drawable/searchedittext_custom_cursor.xml
index 27614a1..51e984c 100644
--- a/java/com/android/contacts/common/res/drawable/searchedittext_custom_cursor.xml
+++ b/java/com/android/contacts/common/res/drawable/searchedittext_custom_cursor.xml
@@ -1,7 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright 2014 Google Inc. All Rights Reserved. -->
+<!--
+ ~ 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">
<size android:width="2dp"/>
- <solid android:color="@color/dialtacts_theme_color"/>
+ <solid android:color="?android:attr/colorPrimary"/>
</shape>
\ No newline at end of file
diff --git a/java/com/android/contacts/common/res/values/colors.xml b/java/com/android/contacts/common/res/values/colors.xml
index 3044339..b05c19a 100644
--- a/java/com/android/contacts/common/res/values/colors.xml
+++ b/java/com/android/contacts/common/res/values/colors.xml
@@ -51,7 +51,7 @@
<item>#424242</item>
</array>
- <color name="contactscommon_actionbar_background_color">@color/dialer_theme_color</color>
+ <color name="contactscommon_actionbar_background_color">?android:attr/colorPrimary</color>
<color name="tab_ripple_color">#ffffff</color>
<color name="tab_accent_color">@color/tab_ripple_color</color>
@@ -75,7 +75,7 @@
<color name="searchbox_hint_text_color">#737373</color>
<color name="searchbox_icon_tint">@color/searchbox_hint_text_color</color>
- <color name="search_shortcut_icon_color">@color/dialtacts_theme_color</color>
+ <color name="search_shortcut_icon_color">?android:attr/colorPrimary</color>
<!-- Color of the background of the contact detail and editor pages -->
<color name="background_primary">#f9f9f9</color>
diff --git a/java/com/android/dialer/about/AndroidManifest.xml b/java/com/android/dialer/about/AndroidManifest.xml
index 3d5067a..6892674 100644
--- a/java/com/android/dialer/about/AndroidManifest.xml
+++ b/java/com/android/dialer/about/AndroidManifest.xml
@@ -14,7 +14,7 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.dialer.about">
- <application android:theme="@style/Theme.AppCompat">
+ <application>
<activity
android:name="com.android.dialer.about.LicenseMenuActivity"
android:label="@string/licenseActivityLabel"
diff --git a/java/com/android/dialer/app/AndroidManifest.xml b/java/com/android/dialer/app/AndroidManifest.xml
index 3536ecd..190f098 100644
--- a/java/com/android/dialer/app/AndroidManifest.xml
+++ b/java/com/android/dialer/app/AndroidManifest.xml
@@ -58,9 +58,9 @@
android:minSdkVersion="24"
android:targetSdkVersion="28"/>
- <application android:theme="@style/Theme.AppCompat">
+ <application>
- <activity
+ <activity
android:exported="false"
android:label="@string/manage_blocked_numbers_label"
android:name="com.android.dialer.app.filterednumber.BlockedNumbersSettingsActivity"
@@ -75,7 +75,7 @@
<activity
android:label="@string/call_log_activity_title"
android:name="com.android.dialer.app.calllog.CallLogActivity"
- android:theme="@style/DialtactsThemeWithoutActionBarOverlay">
+ android:theme="@style/DialtactsTheme">
</activity>
<receiver android:name="com.android.dialer.app.calllog.CallLogReceiver">
diff --git a/java/com/android/dialer/app/calllog/BlockReportSpamListener.java b/java/com/android/dialer/app/calllog/BlockReportSpamListener.java
index 987615f..865cb81 100644
--- a/java/com/android/dialer/app/calllog/BlockReportSpamListener.java
+++ b/java/com/android/dialer/app/calllog/BlockReportSpamListener.java
@@ -16,9 +16,9 @@
package com.android.dialer.app.calllog;
-import android.app.FragmentManager;
import android.content.Context;
import android.support.annotation.NonNull;
+import android.support.v4.app.FragmentManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import com.android.dialer.blocking.FilteredNumberAsyncQueryHandler;
diff --git a/java/com/android/dialer/app/calllog/CallLogAdapter.java b/java/com/android/dialer/app/calllog/CallLogAdapter.java
index 450e5ea..143af36 100644
--- a/java/com/android/dialer/app/calllog/CallLogAdapter.java
+++ b/java/com/android/dialer/app/calllog/CallLogAdapter.java
@@ -36,6 +36,7 @@
import android.support.annotation.VisibleForTesting;
import android.support.annotation.WorkerThread;
import android.support.v7.app.AlertDialog;
+import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.RecyclerView.ViewHolder;
import android.telecom.PhoneAccountHandle;
@@ -223,7 +224,7 @@
private void showDeleteSelectedItemsDialog() {
SparseArray<String> voicemailsToDeleteOnConfirmation = selectedItems.clone();
- new AlertDialog.Builder(activity, R.style.AlertDialogCustom)
+ new AlertDialog.Builder(activity)
.setCancelable(true)
.setTitle(
activity
@@ -557,7 +558,7 @@
new BlockReportSpamListener(
this.activity,
this.activity.findViewById(R.id.call_log_fragment_root),
- ((Activity) this.activity).getFragmentManager(),
+ ((AppCompatActivity) this.activity).getSupportFragmentManager(),
this,
this.filteredNumberAsyncQueryHandler);
setHasStableIds(true);
diff --git a/java/com/android/dialer/app/manifests/activities/AndroidManifest.xml b/java/com/android/dialer/app/manifests/activities/AndroidManifest.xml
index 31960c9..edf0f1c 100644
--- a/java/com/android/dialer/app/manifests/activities/AndroidManifest.xml
+++ b/java/com/android/dialer/app/manifests/activities/AndroidManifest.xml
@@ -19,7 +19,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.dialer.app">
- <application android:theme="@style/Theme.AppCompat">
+ <application>
<activity
android:exported="false"
@@ -101,7 +101,7 @@
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.TAB"/>
</intent-filter>
- <intent-filter android:label="@string/main_call_history_tab_description">
+ <intent-filter>
<action android:name="com.android.phone.action.RECENT_CALLS"/>
<category android:name="android.intent.category.DEFAULT"/>
diff --git a/java/com/android/dialer/app/res/drawable/ic_voicemail_seek_handle.xml b/java/com/android/dialer/app/res/drawable/ic_voicemail_seek_handle.xml
index ffdd64e..00b23b8 100644
--- a/java/com/android/dialer/app/res/drawable/ic_voicemail_seek_handle.xml
+++ b/java/com/android/dialer/app/res/drawable/ic_voicemail_seek_handle.xml
@@ -16,5 +16,5 @@
-->
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/old_ic_handle"
- android:tint="@color/actionbar_background_color">
+ android:tint="?android:attr/colorPrimary">
</bitmap>
\ No newline at end of file
diff --git a/java/com/android/dialer/app/res/drawable/selectable_primary_flat_button.xml b/java/com/android/dialer/app/res/drawable/selectable_primary_flat_button.xml
index 47d1152..2a393a5 100644
--- a/java/com/android/dialer/app/res/drawable/selectable_primary_flat_button.xml
+++ b/java/com/android/dialer/app/res/drawable/selectable_primary_flat_button.xml
@@ -25,7 +25,7 @@
</item>
<item>
<shape>
- <solid android:color="@color/dialer_theme_color"/>
+ <solid android:color="?android:attr/colorPrimary"/>
</shape>
</item>
</selector>
\ No newline at end of file
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 a5e5326..d9d40a1 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
@@ -18,7 +18,7 @@
android:id="@+id/calllog_frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/background_dialer_light"
+ android:background="?android:attr/colorBackgroundFloating"
android:orientation="vertical">
<com.android.contacts.common.list.ViewPagerTabs
android:id="@+id/viewpager_header"
diff --git a/java/com/android/dialer/app/res/layout/call_log_fragment.xml b/java/com/android/dialer/app/res/layout/call_log_fragment.xml
index f056396..2fb6360 100644
--- a/java/com/android/dialer/app/res/layout/call_log_fragment.xml
+++ b/java/com/android/dialer/app/res/layout/call_log_fragment.xml
@@ -26,7 +26,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/tab_height"
android:layout_gravity="start"
- android:background="@color/actionbar_background_color"
+ android:background="?android:attr/colorPrimary"
android:orientation="horizontal"
android:visibility="gone">
diff --git a/java/com/android/dialer/app/res/layout/call_log_list_item.xml b/java/com/android/dialer/app/res/layout/call_log_list_item.xml
index d111110..23aeda3 100644
--- a/java/com/android/dialer/app/res/layout/call_log_list_item.xml
+++ b/java/com/android/dialer/app/res/layout/call_log_list_item.xml
@@ -143,7 +143,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/call_log_call_account_margin_bottom"
android:layout_marginEnd="@dimen/call_log_icon_margin"
- android:textColor="?android:textColorSecondary"
+ android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/call_log_detail_text_size"
android:visibility="gone"
android:maxLines="1"/>
diff --git a/java/com/android/dialer/app/res/layout/dialtacts_activity.xml b/java/com/android/dialer/app/res/layout/dialtacts_activity.xml
index 1627844..cf6591b 100644
--- a/java/com/android/dialer/app/res/layout/dialtacts_activity.xml
+++ b/java/com/android/dialer/app/res/layout/dialtacts_activity.xml
@@ -19,7 +19,7 @@
android:id="@+id/dialtacts_mainlayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/background_dialer_light"
+ android:background="?android:attr/colorBackgroundFloating"
android:clipChildren="false"
android:clipToPadding="false"
android:focusable="true"
diff --git a/java/com/android/dialer/app/res/layout/keyguard_preview.xml b/java/com/android/dialer/app/res/layout/keyguard_preview.xml
index eab98d2..e5207ac 100644
--- a/java/com/android/dialer/app/res/layout/keyguard_preview.xml
+++ b/java/com/android/dialer/app/res/layout/keyguard_preview.xml
@@ -23,7 +23,7 @@
<View
android:layout_width="match_parent"
android:layout_height="25dp"
- android:background="@color/dialer_theme_color_dark"/>
+ android:background="?android:attr/colorPrimaryDark"/>
<View
android:layout_width="match_parent"
android:layout_height="0dp"
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 9596172..1126b0e 100644
--- a/java/com/android/dialer/app/res/layout/lists_fragment.xml
+++ b/java/com/android/dialer/app/res/layout/lists_fragment.xml
@@ -32,7 +32,7 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="@dimen/action_bar_height_large"
- android:background="@color/actionbar_background_color"
+ android:background="?android:attr/colorPrimary"
android:elevation="@dimen/tab_elevation"/>
<com.android.contacts.common.list.ViewPagerTabs
@@ -69,7 +69,7 @@
android:id="@+id/remove_view_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/actionbar_background_color"
+ android:background="?android:attr/colorPrimary"
android:gravity="center"
android:orientation="horizontal"
android:visibility="gone">
diff --git a/java/com/android/dialer/app/res/layout/search_edittext.xml b/java/com/android/dialer/app/res/layout/search_edittext.xml
index 5fc492d..8a2cfd4 100644
--- a/java/com/android/dialer/app/res/layout/search_edittext.xml
+++ b/java/com/android/dialer/app/res/layout/search_edittext.xml
@@ -31,7 +31,7 @@
android:id="@+id/search_box_collapsed"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="?android:selectableItemBackground"
+ android:background="?android:attr/selectableItemBackground"
android:gravity="center_vertical">
<ImageView
diff --git a/java/com/android/dialer/app/res/layout/voicemail_playback_layout.xml b/java/com/android/dialer/app/res/layout/voicemail_playback_layout.xml
index 2589a67..a9b866e 100644
--- a/java/com/android/dialer/app/res/layout/voicemail_playback_layout.xml
+++ b/java/com/android/dialer/app/res/layout/voicemail_playback_layout.xml
@@ -20,7 +20,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="64dp"
android:layout_marginEnd="24dp"
- android:background="@color/background_dialer_call_log_list_item"
+ android:background="?android:attr/colorBackgroundFloating"
android:orientation="vertical">
<TextView
diff --git a/java/com/android/dialer/app/res/values-v27/styles.xml b/java/com/android/dialer/app/res/values-v27/styles.xml
index 5a946b6..76ae4ba 100644
--- a/java/com/android/dialer/app/res/values-v27/styles.xml
+++ b/java/com/android/dialer/app/res/values-v27/styles.xml
@@ -15,9 +15,9 @@
~ limitations under the License
-->
<resources>
- <style name="DialtactsTheme" parent="DialtactsThemeBase">
+ <style name="DialtactsTheme" parent="Dialer.ThemeBase">
<item name="android:windowLightNavigationBar">true</item>
- <item name="android:navigationBarColor">?android:windowBackground</item>
+ <item name="android:navigationBarColor">?android:attr/windowBackground</item>
<item name="android:navigationBarDividerColor">#E0E0E0</item>
</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 e79c5c5..2b8d63a 100644
--- a/java/com/android/dialer/app/res/values/colors.xml
+++ b/java/com/android/dialer/app/res/values/colors.xml
@@ -15,13 +15,8 @@
-->
<resources>
- <color name="dialer_flat_button_text_color">@color/dialer_theme_color</color>
+ <color name="dialer_flat_button_text_color">?android:attr/colorPrimary</color>
- <!-- Color for the setting text. -->
- <color name="setting_primary_color">@color/dialer_primary_text_color</color>
- <!-- Color for the setting description text. -->
- <color name="setting_secondary_color">@color/dialer_secondary_text_color</color>
- <color name="setting_disabled_color">#aaaaaa</color>
<color name="setting_background_color">#ffffff</color>
<!-- 54% black -->
@@ -50,7 +45,7 @@
<!-- Colour of voicemail progress bar to the right of position indicator. -->
<color name="voicemail_playback_seek_bar_yet_to_play">#cecece</color>
<!-- Colour of voicemail progress bar to the left of position indicator. -->
- <color name="voicemail_playback_seek_bar_already_played">@color/dialer_theme_color</color>
+ <color name="voicemail_playback_seek_bar_already_played">?android:attr/colorPrimary</color>
<!-- Background color for search results and call details -->
<color name="background_dialer_results">#f9f9f9</color>
@@ -76,7 +71,7 @@
<color name="blocked_number_icon_tint">#616161</color>
<color name="blocked_number_background">#FFFFFF</color>
<color name="blocked_number_block_color">#F44336</color>
- <color name="blocked_number_header_color">@color/dialer_theme_color</color>
+ <color name="blocked_number_header_color">?android:attr/colorPrimary</color>
<color name="blocked_number_disabled_emergency_background_color">#E0E0E0</color>
<color name="add_blocked_number_icon_color">#bdbdbd</color>
diff --git a/java/com/android/dialer/app/res/values/styles.xml b/java/com/android/dialer/app/res/values/styles.xml
index 869f127..54d18f1 100644
--- a/java/com/android/dialer/app/res/values/styles.xml
+++ b/java/com/android/dialer/app/res/values/styles.xml
@@ -15,134 +15,18 @@
~ limitations under the License
-->
<resources>
-
- <style name="AlertDialogCustom" parent="Theme.AppCompat.Light.Dialog.Alert">
- <item name="android:colorPrimary">@color/dialtacts_theme_color</item>
- <item name="android:colorAccent">@color/dialtacts_theme_color</item>
- </style>
-
- <style name="DialtactsThemeBase" parent="DialerThemeBase">
-
- <!-- Styles that require AppCompat compatibility, remember to update both sets -->
- <item name="android:windowActionBarOverlay">true</item>
- <item name="windowActionBarOverlay">true</item>
- <item name="android:windowActionModeOverlay">true</item>
- <item name="windowActionModeOverlay">true</item>
- <item name="android:actionBarStyle">@style/DialtactsActionBarStyle</item>
- <item name="actionBarStyle">@style/DialtactsActionBarStyle</item>
- <item name="actionModeStyle">@style/ActionModeStyle</item>
- <item name="android:actionModeStyle">@style/ActionModeStyle</item>
-
- <item name="android:windowContentOverlay">@null</item>
- <item name="android:overlapAnchor">true</item>
-
- <item name="android:listViewStyle">@style/ListViewStyle</item>
- <item name="list_section_header_height">32dip</item>
- <item name="list_item_padding_top">7dp</item>
- <item name="list_item_padding_right">24dp</item>
- <item name="list_item_padding_bottom">7dp</item>
- <item name="list_item_padding_left">16dp</item>
- <item name="list_item_gap_between_image_and_text">
- @dimen/contact_browser_list_item_gap_between_image_and_text
- </item>
- <item name="list_item_gap_between_label_and_data">8dip</item>
- <item name="list_item_presence_icon_margin">4dip</item>
- <item name="list_item_presence_icon_size">16dip</item>
- <item name="list_item_photo_size">@dimen/contact_browser_list_item_photo_size</item>
- <item name="list_item_profile_photo_size">70dip</item>
- <item name="list_item_prefix_highlight_color">@color/people_app_theme_color</item>
- <item name="list_item_background_color">@color/background_dialer_light</item>
- <item name="list_item_header_text_indent">8dip</item>
- <item name="list_item_header_text_color">@color/dialer_secondary_text_color</item>
- <item name="list_item_header_text_size">14sp</item>
- <item name="list_item_header_height">30dip</item>
- <item name="list_item_data_width_weight">5</item>
- <item name="list_item_label_width_weight">3</item>
- <item name="contact_browser_list_padding_left">0dp</item>
- <item name="contact_browser_list_padding_right">0dp</item>
- <item name="contact_browser_background">@color/background_dialer_results</item>
- <item name="list_item_name_text_color">@color/contact_list_name_text_color</item>
- <item name="list_item_name_text_size">16sp</item>
- <item name="list_item_text_indent">@dimen/contact_browser_list_item_text_indent</item>
- <item name="list_item_text_offset_top">-2dp</item>
- <!-- Favorites -->
- <item name="favorites_padding_bottom">?android:attr/actionBarSize</item>
- <item name="dialpad_key_button_touch_tint">@color/dialer_dialpad_touch_tint</item>
- <item name="android:textAppearanceButton">@style/DialerButtonTextStyle</item>
-
- <!-- Video call icon -->
- <item name="list_item_video_call_icon_size">48dip</item>
- <item name="list_item_video_call_icon_margin">8dip</item>
-
- <item name="dialpad_style">@style/Dialpad.Light</item>
- </style>
-
- <style name="DialtactsTheme" parent="DialtactsThemeBase">
- </style>
-
- <!-- Action bar overflow menu icon. White with no shadow. -->
- <style name="DialtactsActionBarOverflowWhite"
- parent="@android:style/Widget.Material.Light.ActionButton.Overflow">
- <item name="android:src">@drawable/quantum_ic_more_vert_white_24</item>
- </style>
+ <style name="DialtactsTheme" parent="Dialer.ThemeBase"/>
<style name="DialpadTheme" parent="DialtactsTheme">
- <item name="android:textColorPrimary">#FFFFFF</item>
- </style>
-
- <style name="DialtactsThemeWithoutActionBarOverlay" parent="DialtactsTheme">
- <!-- Styles that require AppCompat compatibility, remember to update both sets -->
- <item name="android:windowActionBarOverlay">false</item>
- <item name="windowActionBarOverlay">false</item>
- <item name="android:actionOverflowButtonStyle">@style/DialtactsActionBarOverflowWhite</item>
- <item name="actionOverflowButtonStyle">@style/DialtactsActionBarOverflowWhite</item>
- </style>
-
- <!-- Hide the actionbar title during the activity preview -->
- <style name="DialtactsActivityTheme" parent="DialtactsTheme">
- <!-- Styles that require AppCompat compatibility, remember to update both sets -->
- <item name="android:actionBarStyle">@style/DialtactsActionBarWithoutTitleStyle</item>
- <item name="actionBarStyle">@style/DialtactsActionBarWithoutTitleStyle</item>
-
- <item name="android:fastScrollThumbDrawable">@drawable/fastscroll_thumb</item>
- <item name="android:fastScrollTrackDrawable">@null</item>
- </style>
-
- <style name="DialtactsActionBarStyle" parent="DialerActionBarBaseStyle">
- <!-- Styles that require AppCompat compatibility, remember to update both sets -->
- <item name="android:background">@color/actionbar_background_color</item>
- <item name="background">@color/actionbar_background_color</item>
- <item name="android:titleTextStyle">@style/DialtactsActionBarTitleText</item>
- <item name="titleTextStyle">@style/DialtactsActionBarTitleText</item>
- <item name="android:elevation">@dimen/action_bar_elevation</item>
- <item name="elevation">@dimen/action_bar_elevation</item>
- <!-- Empty icon -->
- <item name="android:icon">@android:color/transparent</item>
- <item name="icon">@android:color/transparent</item>
- <!-- Shift the title text to the right -->
- <item name="android:contentInsetStart">@dimen/actionbar_contentInsetStart</item>
- <item name="contentInsetStart">@dimen/actionbar_contentInsetStart</item>
+ <item name="android:textColorPrimary">?android:attr/textColorPrimaryInverse</item>
</style>
<style name="ActionModeStyle" parent="Widget.AppCompat.ActionMode">
- <item name="android:background">@color/actionbar_background_color</item>
- <item name="background">@color/actionbar_background_color</item>
+ <item name="android:background">?android:attr/colorPrimary</item>
+ <item name="background">?android:attr/colorPrimary</item>
<item name="closeItemLayout">@layout/action_mode_close_button</item>
</style>
- <style name="DialtactsActionBarWithoutTitleStyle" parent="DialtactsActionBarStyle">
- <!-- Styles that require AppCompat compatibility, remember to update both sets -->
- <item name="android:displayOptions"></item>
- <item name="displayOptions"></item>
- <item name="android:height">@dimen/action_bar_height_large</item>
- <item name="height">@dimen/action_bar_height_large</item>
- <!-- Override ActionBar title offset to keep search box aligned left -->
- <item name="android:contentInsetStart">0dp</item>
- <item name="contentInsetStart">0dp</item>
- <item name="android:contentInsetEnd">0dp</item>
- <item name="contentInsetEnd">0dp</item>
- </style>
-
<style name="DialtactsSearchBarThemeOverlay" parent="ThemeOverlay.AppCompat.Light"/>
<!-- Text in the action bar at the top of the screen -->
@@ -189,34 +73,42 @@
<item name="android:layout_width">@dimen/call_log_action_icon_dimen</item>
<item name="android:layout_height">@dimen/call_log_action_icon_dimen</item>
<item name="android:layout_marginStart">@dimen/call_log_action_icon_margin_start</item>
- <item name="android:tint">?android:textColorSecondary</item>
+ <item name="android:tint">?android:attr/textColorSecondary</item>
<item name="android:importantForAccessibility">no</item>
</style>
- <!-- Style applied to the "Settings" screen. Keep in sync with SettingsLight in Telephony. -->
- <style name="SettingsStyle" parent="DialtactsThemeWithoutActionBarOverlay">
- <!-- 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">@color/setting_background_color</item>
- <item name="android:colorAccent">@color/dialtacts_theme_color</item>
- <item name="android:textColorLink">@color/dialtacts_theme_color</item>
- </style>
-
<style name="ManageBlockedNumbersStyle" parent="SettingsStyle">
<!-- Styles that require AppCompat compatibility, remember to update both sets -->
<item name="android:windowActionBarOverlay">true</item>
<item name="windowActionBarOverlay">true</item>
<item name="android:actionBarStyle">@style/ManageBlockedNumbersActionBarStyle</item>
- <item name="actionBarStyle">@style/ManageBlockedNumbersActionBarStyle</item>
<item name="android:fastScrollTrackDrawable">@null</item>
</style>
- <style name="ManageBlockedNumbersActionBarStyle" parent="DialtactsActionBarWithoutTitleStyle">
+ <style name="ManageBlockedNumbersActionBarStyle" parent="DialerActionBarBaseStyle">
<!-- Styles that require AppCompat compatibility, remember to update both sets -->
<item name="android:height">@dimen/action_bar_height</item>
<item name="height">@dimen/action_bar_height</item>
+
+ <!-- Styles that require AppCompat compatibility, remember to update both sets -->
+ <item name="android:displayOptions"></item>
+ <item name="displayOptions"></item>
+ <!-- Override ActionBar title offset to keep search box aligned left -->
+ <item name="android:contentInsetStart">0dp</item>
+ <item name="contentInsetStart">0dp</item>
+ <item name="android:contentInsetEnd">0dp</item>
+ <item name="contentInsetEnd">0dp</item>
+
+ <!-- Styles that require AppCompat compatibility, remember to update both sets -->
+ <item name="android:background">?android:attr/colorPrimary</item>
+ <item name="background">?android:attr/colorPrimary</item>
+ <item name="android:titleTextStyle">@style/DialtactsActionBarTitleText</item>
+ <item name="titleTextStyle">@style/DialtactsActionBarTitleText</item>
+ <item name="android:elevation">@dimen/action_bar_elevation</item>
+ <item name="elevation">@dimen/action_bar_elevation</item>
+ <!-- Empty icon -->
+ <item name="android:icon">@android:color/transparent</item>
+ <item name="icon">@android:color/transparent</item>
</style>
<style name="VoicemailPlaybackLayoutButtonStyle">
@@ -272,7 +164,7 @@
</style>
<style name="PromoLinkStyle">
- <item name="android:textColor">@color/dialer_theme_color</item>
+ <item name="android:textColor">?android:attr/colorPrimary</item>
<item name="android:fontFamily">"sans-serif-medium"</item>
</style>
diff --git a/java/com/android/dialer/binary/common/DialerApplication.java b/java/com/android/dialer/binary/common/DialerApplication.java
index 3247c70..31d4d82 100644
--- a/java/com/android/dialer/binary/common/DialerApplication.java
+++ b/java/com/android/dialer/binary/common/DialerApplication.java
@@ -42,7 +42,6 @@
public void onCreate() {
Trace.beginSection("DialerApplication.onCreate");
StrictModeComponent.get(this).getDialerStrictMode().onApplicationCreate(this);
-
super.onCreate();
new BlockedNumbersAutoMigrator(
this.getApplicationContext(),
diff --git a/java/com/android/dialer/blocking/AndroidManifest.xml b/java/com/android/dialer/blocking/AndroidManifest.xml
index 08d2439..fb811ea 100644
--- a/java/com/android/dialer/blocking/AndroidManifest.xml
+++ b/java/com/android/dialer/blocking/AndroidManifest.xml
@@ -1,9 +1,23 @@
+<!-- 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.
+-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.dialer.blocking">
- <application android:theme="@style/Theme.AppCompat">
+ <application>
- <provider
+ <provider
android:authorities="com.android.dialer.blocking.filterednumberprovider"
android:exported="false"
android:multiprocess="false"
diff --git a/java/com/android/dialer/blockreportspam/BlockReportSpamDialogs.java b/java/com/android/dialer/blockreportspam/BlockReportSpamDialogs.java
index db5fe21..ff2a588 100644
--- a/java/com/android/dialer/blockreportspam/BlockReportSpamDialogs.java
+++ b/java/com/android/dialer/blockreportspam/BlockReportSpamDialogs.java
@@ -17,13 +17,13 @@
package com.android.dialer.blockreportspam;
import android.app.Activity;
-import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.DialogFragment;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.Nullable;
+import android.support.v4.app.DialogFragment;
+import android.support.v7.app.AlertDialog;
import android.view.View;
import android.widget.CheckBox;
import android.widget.TextView;
@@ -40,7 +40,7 @@
/** Creates a dialog with the default cancel button listener (which dismisses the dialog). */
private static AlertDialog.Builder createDialogBuilder(
Activity activity, final DialogFragment fragment) {
- return new AlertDialog.Builder(activity, R.style.AlertDialogTheme)
+ return new AlertDialog.Builder(activity)
.setCancelable(true)
.setNegativeButton(android.R.string.cancel, (dialog, which) -> fragment.dismiss());
}
diff --git a/java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogReceiver.java b/java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogReceiver.java
index fd26ab5..fb0399d 100644
--- a/java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogReceiver.java
+++ b/java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogReceiver.java
@@ -16,11 +16,11 @@
package com.android.dialer.blockreportspam;
-import android.app.FragmentManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
+import android.support.v4.app.FragmentManager;
import android.widget.Toast;
import com.android.dialer.blocking.Blocking;
import com.android.dialer.blocking.Blocking.BlockingFailedException;
diff --git a/java/com/android/dialer/callcomposer/AndroidManifest.xml b/java/com/android/dialer/callcomposer/AndroidManifest.xml
index cce7110..369db6f 100644
--- a/java/com/android/dialer/callcomposer/AndroidManifest.xml
+++ b/java/com/android/dialer/callcomposer/AndroidManifest.xml
@@ -17,7 +17,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.dialer.callcomposer">
- <application android:theme="@style/Theme.AppCompat">
+ <application>
<activity
android:name="com.android.dialer.callcomposer.CallComposerActivity"
android:exported="true"
diff --git a/java/com/android/dialer/callcomposer/cameraui/res/layout/camera_view.xml b/java/com/android/dialer/callcomposer/cameraui/res/layout/camera_view.xml
index 8169a3d..d588511 100644
--- a/java/com/android/dialer/callcomposer/cameraui/res/layout/camera_view.xml
+++ b/java/com/android/dialer/callcomposer/cameraui/res/layout/camera_view.xml
@@ -71,7 +71,7 @@
android:layout_marginEnd="@dimen/camera_view_button_margin"
android:layout_marginBottom="@dimen/camera_view_button_margin"
android:src="@drawable/quantum_ic_fullscreen_white_48"
- android:background="?android:selectableItemBackgroundBorderless"
+ android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/description_camera_switch_full_screen"/>
<ImageButton
@@ -83,7 +83,7 @@
android:layout_marginBottom="@dimen/camera_view_button_margin"
android:src="@drawable/quantum_ic_fullscreen_exit_white_48"
android:visibility="gone"
- android:background="?android:selectableItemBackgroundBorderless"
+ android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/description_camera_switch_preview_screen"/>
<ImageButton
@@ -92,7 +92,7 @@
android:layout_height="@dimen/capture_button_size"
android:layout_gravity="bottom|center_horizontal"
android:layout_marginBottom="@dimen/capture_button_bottom_margin"
- android:background="?android:selectableItemBackgroundBorderless"
+ android:background="?android:attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_capture"
android:scaleType="fitXY"
android:contentDescription="@string/description_camera_take_picture"/>
diff --git a/java/com/android/dialer/callcomposer/res/drawable/call_composer_contact_border.xml b/java/com/android/dialer/callcomposer/res/drawable/call_composer_contact_border.xml
index b3c36e9..16afed4 100644
--- a/java/com/android/dialer/callcomposer/res/drawable/call_composer_contact_border.xml
+++ b/java/com/android/dialer/callcomposer/res/drawable/call_composer_contact_border.xml
@@ -20,7 +20,7 @@
<stroke
android:width="@dimen/call_composer_contact_photo_border_thickness"
- android:color="@color/background_dialer_white"/>
+ android:color="?android:attr/colorBackground"/>
<padding
android:bottom="@dimen/call_composer_contact_photo_border_thickness"
diff --git a/java/com/android/dialer/callcomposer/res/drawable/gallery_grid_item_view_background.xml b/java/com/android/dialer/callcomposer/res/drawable/gallery_grid_item_view_background.xml
index bbae1a8..f571608 100644
--- a/java/com/android/dialer/callcomposer/res/drawable/gallery_grid_item_view_background.xml
+++ b/java/com/android/dialer/callcomposer/res/drawable/gallery_grid_item_view_background.xml
@@ -18,5 +18,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="@dimen/gallery_item_corner_radius"/>
- <solid android:color="@color/background_dialer_white"/>
+ <solid android:color="?android:attr/colorBackground"/>
</shape>
diff --git a/java/com/android/dialer/callcomposer/res/drawable/gallery_item_selected_drawable.xml b/java/com/android/dialer/callcomposer/res/drawable/gallery_item_selected_drawable.xml
index 5050407..6e726c8 100644
--- a/java/com/android/dialer/callcomposer/res/drawable/gallery_item_selected_drawable.xml
+++ b/java/com/android/dialer/callcomposer/res/drawable/gallery_item_selected_drawable.xml
@@ -20,9 +20,9 @@
android:shape="oval">
<stroke
android:width="1dp"
- android:color="@color/dialer_theme_color"/>
+ android:color="?android:attr/colorPrimary"/>
<solid
- android:color="@color/background_dialer_white"/>
+ android:color="?android:attr/colorBackground"/>
<size
android:height="@dimen/gallery_check_size"
android:width="@dimen/gallery_check_size"/>
@@ -32,6 +32,6 @@
<bitmap
android:gravity="center"
android:src="@drawable/quantum_ic_check_black_24"
- android:tint="@color/dialer_theme_color"/>
+ android:tint="?android:attr/colorPrimary"/>
</item>
</layer-list>
\ No newline at end of file
diff --git a/java/com/android/dialer/callcomposer/res/layout/call_composer_activity.xml b/java/com/android/dialer/callcomposer/res/layout/call_composer_activity.xml
index 48d6368..4d3769b 100644
--- a/java/com/android/dialer/callcomposer/res/layout/call_composer_activity.xml
+++ b/java/com/android/dialer/callcomposer/res/layout/call_composer_activity.xml
@@ -45,7 +45,7 @@
android:paddingBottom="@dimen/call_composer_contact_container_padding_bottom"
android:paddingStart="16dp"
android:paddingEnd="16dp"
- android:background="@color/dialer_theme_color">
+ android:background="?android:attr/colorPrimary">
<TextView
android:id="@+id/contact_name"
@@ -54,7 +54,7 @@
android:gravity="center"
android:maxLines="1"
android:ellipsize="end"
- android:textColor="@color/background_dialer_white"
+ android:textColor="?android:attr/colorBackground"
android:textSize="@dimen/call_composer_name_text_size"/>
<TextView
@@ -64,7 +64,7 @@
android:gravity="center"
android:maxLines="1"
android:ellipsize="end"
- android:textColor="@color/background_dialer_white"
+ android:textColor="?android:attr/colorBackground"
android:textSize="@dimen/call_composer_number_text_size"/>
</LinearLayout>
@@ -105,7 +105,7 @@
android:layout_height="@dimen/call_composer_media_bar_height"
android:orientation="horizontal"
android:gravity="center_horizontal"
- android:background="@color/dialer_theme_color_dark"
+ android:background="?android:attr/colorPrimaryDark"
android:clickable="true">
<ImageView
@@ -153,7 +153,7 @@
android:text="@string/share_and_call"
android:textSize="@dimen/send_and_call_text_size"
android:fontFamily="sans-serif-medium"
- android:textColor="@color/background_dialer_white"/>
+ android:textColor="?android:attr/colorBackground"/>
</FrameLayout>
</FrameLayout>
diff --git a/java/com/android/dialer/callcomposer/res/layout/fragment_gallery_composer.xml b/java/com/android/dialer/callcomposer/res/layout/fragment_gallery_composer.xml
index 6cd6418..72b9fa6 100644
--- a/java/com/android/dialer/callcomposer/res/layout/fragment_gallery_composer.xml
+++ b/java/com/android/dialer/callcomposer/res/layout/fragment_gallery_composer.xml
@@ -18,7 +18,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/background_dialer_white"
+ android:background="?android:attr/colorBackground"
android:paddingBottom="@dimen/call_composer_media_bar_height">
<GridView
diff --git a/java/com/android/dialer/callcomposer/res/layout/fragment_message_composer.xml b/java/com/android/dialer/callcomposer/res/layout/fragment_message_composer.xml
index 39c2d0d..49df9e6 100644
--- a/java/com/android/dialer/callcomposer/res/layout/fragment_message_composer.xml
+++ b/java/com/android/dialer/callcomposer/res/layout/fragment_message_composer.xml
@@ -20,7 +20,7 @@
android:layout_height="@dimen/call_composer_view_pager_height"
android:orientation="vertical"
android:gravity="bottom"
- android:background="@color/background_dialer_white">
+ android:background="?android:attr/colorBackground">
<TextView
android:id="@+id/message_urgent"
@@ -65,8 +65,8 @@
android:textSize="@dimen/message_compose_item_text_size"
android:hint="@string/message_composer_custom_message_hint"
android:textColor="@color/dialer_primary_text_color"
- android:textColorHint="@color/dialer_edit_text_hint_color"
- android:background="@color/background_dialer_white"
+ android:textColorHint="?android:attr/textColorHint"
+ android:background="?android:attr/colorBackground"
android:textCursorDrawable="@drawable/searchedittext_custom_cursor"
android:layout_toStartOf="@+id/remaining_characters"
android:inputType="textShortMessage|textCapSentences"
@@ -81,6 +81,6 @@
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:textSize="@dimen/message_compose_remaining_char_text_size"
- android:textColor="@color/dialer_edit_text_hint_color"/>
+ android:textColor="?android:attr/textColorHint"/>
</RelativeLayout>
</LinearLayout>
\ No newline at end of file
diff --git a/java/com/android/dialer/callcomposer/res/layout/permission_view.xml b/java/com/android/dialer/callcomposer/res/layout/permission_view.xml
index 4daa11d..783ba98 100644
--- a/java/com/android/dialer/callcomposer/res/layout/permission_view.xml
+++ b/java/com/android/dialer/callcomposer/res/layout/permission_view.xml
@@ -20,7 +20,7 @@
android:layout_height="match_parent"
android:gravity="center"
android:clickable="true"
- android:background="@color/background_dialer_white">
+ android:background="?android:attr/colorBackground">
<ImageView
android:id="@+id/permission_icon"
@@ -45,7 +45,7 @@
android:text="@string/allow"
android:textAllCaps="true"
android:textSize="@dimen/allow_permission_text_size"
- android:textColor="@color/dialer_theme_color"
+ android:textColor="?android:attr/colorPrimary"
android:background="?android:attr/selectableItemBackground"
android:padding="@dimen/permission_allow_padding"
android:theme="@style/Theme.AppCompat.Light"/>
diff --git a/java/com/android/dialer/callcomposer/res/values/styles.xml b/java/com/android/dialer/callcomposer/res/values/styles.xml
index a03ee48..aeec2a3 100644
--- a/java/com/android/dialer/callcomposer/res/values/styles.xml
+++ b/java/com/android/dialer/callcomposer/res/values/styles.xml
@@ -15,8 +15,7 @@
~ limitations under the License
-->
<resources>
- <style name="Theme.AppCompat.CallComposer" parent="DialerThemeBase.NoActionBar">
- <item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item>
+ <style name="Theme.AppCompat.CallComposer" parent="Dialer.ThemeBase.NoActionBar">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowFrame">@null</item>
diff --git a/java/com/android/dialer/calldetails/AndroidManifest.xml b/java/com/android/dialer/calldetails/AndroidManifest.xml
index 9ef05a3..54d9f2f 100644
--- a/java/com/android/dialer/calldetails/AndroidManifest.xml
+++ b/java/com/android/dialer/calldetails/AndroidManifest.xml
@@ -16,18 +16,18 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.dialer.calldetails">
- <application android:theme="@style/Theme.AppCompat">
+ <application>
<activity
android:label="@string/call_details"
android:exported="false"
android:name="com.android.dialer.calldetails.OldCallDetailsActivity"
- android:theme="@style/DialerThemeBase.NoActionBar">
+ android:theme="@style/Dialer.ThemeBase.NoActionBar">
</activity>
<activity
android:label="@string/call_details"
android:exported="false"
android:name="com.android.dialer.calldetails.CallDetailsActivity"
- android:theme="@style/DialerThemeBase.NoActionBar">
+ android:theme="@style/Dialer.ThemeBase.NoActionBar">
</activity>
</application>
</manifest>
diff --git a/java/com/android/dialer/calldetails/res/layout/call_details_activity.xml b/java/com/android/dialer/calldetails/res/layout/call_details_activity.xml
index 10927af..950867d 100644
--- a/java/com/android/dialer/calldetails/res/layout/call_details_activity.xml
+++ b/java/com/android/dialer/calldetails/res/layout/call_details_activity.xml
@@ -29,5 +29,5 @@
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/background_dialer_white"/>
+ android:background="?android:attr/colorBackground"/>
</LinearLayout>
\ No newline at end of file
diff --git a/java/com/android/dialer/calldetails/res/layout/call_details_entry.xml b/java/com/android/dialer/calldetails/res/layout/call_details_entry.xml
index 1e98996..4014097 100644
--- a/java/com/android/dialer/calldetails/res/layout/call_details_entry.xml
+++ b/java/com/android/dialer/calldetails/res/layout/call_details_entry.xml
@@ -30,7 +30,7 @@
<TextView
android:id="@+id/call_type"
- style="@style/PrimaryText"
+ style="@style/Dialer.TextAppearance.Primary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/call_entry_text_left_margin"
@@ -41,7 +41,7 @@
<TextView
android:id="@+id/call_time"
- style="@style/SecondaryText"
+ style="@style/Dialer.TextAppearance.Secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/call_entry_bottom_padding"
@@ -50,7 +50,7 @@
<TextView
android:id="@+id/call_duration"
- style="@style/PrimaryText"
+ style="@style/Dialer.TextAppearance.Primary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/call_entry_padding"
@@ -66,7 +66,7 @@
<TextView
android:id="@+id/post_call_note"
- style="@style/SecondaryText"
+ style="@style/Dialer.TextAppearance.Secondary"
android:layout_width="match_parent"
android:layout_height="@dimen/ec_container_height"
android:layout_below="@+id/ec_container"
@@ -77,7 +77,7 @@
android:visibility="gone"/>
<TextView
android:id="@+id/rtt_transcript"
- style="@style/SecondaryText"
+ style="@style/Dialer.TextAppearance.Secondary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/call_entry_bottom_padding"
diff --git a/java/com/android/dialer/calldetails/res/layout/contact_container.xml b/java/com/android/dialer/calldetails/res/layout/contact_container.xml
index 9506183..e0de8dc 100644
--- a/java/com/android/dialer/calldetails/res/layout/contact_container.xml
+++ b/java/com/android/dialer/calldetails/res/layout/contact_container.xml
@@ -46,21 +46,21 @@
<com.android.dialer.widget.BidiTextView
android:id="@+id/contact_name"
- style="@style/PrimaryText"
+ style="@style/Dialer.TextAppearance.Primary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/photo_text_margin"/>
<TextView
android:id="@+id/phone_number"
- style="@style/SecondaryText"
+ style="@style/Dialer.TextAppearance.Secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/photo_text_margin"/>
<TextView
android:id="@+id/network"
- style="@style/SecondaryText"
+ style="@style/Dialer.TextAppearance.Secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/photo_text_margin"
@@ -101,7 +101,7 @@
<TextView
android:id="@+id/assisted_dialing_text"
- style="@style/SecondaryText"
+ style="@style/Dialer.TextAppearance.Secondary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/ad_text_margin_start"
diff --git a/java/com/android/dialer/calldetails/res/layout/ec_data_container.xml b/java/com/android/dialer/calldetails/res/layout/ec_data_container.xml
index fec3126..5231912 100644
--- a/java/com/android/dialer/calldetails/res/layout/ec_data_container.xml
+++ b/java/com/android/dialer/calldetails/res/layout/ec_data_container.xml
@@ -1,4 +1,19 @@
<?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
+ -->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
@@ -14,7 +29,7 @@
android:layout_centerVertical="true"
android:layout_marginStart="1dp"
android:maxLines="2"
- style="@style/SecondaryText"/>
+ style="@style/Dialer.TextAppearance.Secondary"/>
<FrameLayout
android:id="@+id/multimedia_image_container"
@@ -39,7 +54,7 @@
android:id="@+id/multimedia_attachments_number"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:textColor="@color/background_dialer_white"
+ android:textColor="?android:attr/colorBackground"
android:textSize="20sp"
android:fontFamily="sans-serif-medium"
android:background="#80000000"
diff --git a/java/com/android/dialer/calldetails/res/values/styles.xml b/java/com/android/dialer/calldetails/res/values/styles.xml
index 93567ef..1b4329a 100644
--- a/java/com/android/dialer/calldetails/res/values/styles.xml
+++ b/java/com/android/dialer/calldetails/res/values/styles.xml
@@ -34,7 +34,7 @@
<item name="android:textAllCaps">true</item>
<item name="textAllCaps">true</item>
</style>
- <style name="RttTranscriptMessage" parent="SecondaryText">
+ <style name="RttTranscriptMessage" parent="Dialer.TextAppearance.Secondary">
<item name="android:fontFamily">sans-serif</item>
<item name="android:textAllCaps">false</item>
<item name="textAllCaps">false</item>
diff --git a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_duo_disclosure_card.xml b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_duo_disclosure_card.xml
index 8084635..93fd0ac 100644
--- a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_duo_disclosure_card.xml
+++ b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_duo_disclosure_card.xml
@@ -18,8 +18,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@color/background_dialer_light"
- android:orientation="vertical">
+ android:orientation="vertical"
+ android:background="?android:attr/colorBackground">
<LinearLayout
android:layout_width="match_parent"
diff --git a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml
index b022abb..1bd71bb 100644
--- a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml
+++ b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml
@@ -60,7 +60,7 @@
-->
<TextView
android:id="@+id/primary_text"
- style="@style/PrimaryText"
+ style="@style/Dialer.TextAppearance.Primary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -96,7 +96,7 @@
<TextView
android:id="@+id/call_count"
- style="@style/PrimaryText"
+ style="@style/Dialer.TextAppearance.Primary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="6dp"
@@ -120,7 +120,7 @@
<TextView
android:id="@+id/secondary_text"
- style="@style/SecondaryText"
+ style="@style/Dialer.TextAppearance.Secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
@@ -132,7 +132,7 @@
<!-- 3rd row: phone account info -->
<TextView
android:id="@+id/phone_account"
- style="@style/SecondaryText"
+ style="@style/Dialer.TextAppearance.Secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
diff --git a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_fragment.xml b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_fragment.xml
index 1a2ec22..3275cc0 100644
--- a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_fragment.xml
+++ b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_fragment.xml
@@ -25,13 +25,13 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/floating_action_button_list_bottom_padding"
- android:background="@color/background_dialer_white"
+ android:background="?android:attr/colorBackground"
android:clipToPadding="false"/>
<com.android.dialer.widget.EmptyContentView
android:gravity="center_vertical"
android:id="@+id/new_call_log_empty_content_view"
- android:background="@color/background_dialer_white"
+ android:background="?android:attr/colorBackground"
android:layout_gravity="center"
android:layout_height="match_parent"
android:layout_width="match_parent"
diff --git a/java/com/android/dialer/calllogutils/CallTypeIconsView.java b/java/com/android/dialer/calllogutils/CallTypeIconsView.java
index d8c7889..30d9b61 100644
--- a/java/com/android/dialer/calllogutils/CallTypeIconsView.java
+++ b/java/com/android/dialer/calllogutils/CallTypeIconsView.java
@@ -27,6 +27,7 @@
import android.util.AttributeSet;
import android.view.View;
import com.android.dialer.compat.AppCompatConstants;
+import com.android.dialer.theme.ThemeUtil;
import java.util.ArrayList;
import java.util.List;
@@ -306,38 +307,37 @@
iconId = R.drawable.quantum_ic_voicemail_white_24;
drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId);
voicemail = drawable.mutate();
- voicemail.setColorFilter(r.getColor(R.color.icon_color_grey), PorterDuff.Mode.MULTIPLY);
+ voicemail.setColorFilter(ThemeUtil.getColorIcon(), PorterDuff.Mode.MULTIPLY);
iconId = R.drawable.quantum_ic_block_white_24;
drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId);
blocked = drawable.mutate();
- blocked.setColorFilter(r.getColor(R.color.blocked_call), PorterDuff.Mode.MULTIPLY);
+ blocked.setColorFilter(ThemeUtil.getColorIcon(), PorterDuff.Mode.MULTIPLY);
iconId = R.drawable.quantum_ic_videocam_vd_white_24;
drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId);
videoCall = drawable.mutate();
- videoCall.setColorFilter(r.getColor(R.color.icon_color_grey), PorterDuff.Mode.MULTIPLY);
+ videoCall.setColorFilter(ThemeUtil.getColorIcon(), PorterDuff.Mode.MULTIPLY);
iconId = R.drawable.quantum_ic_hd_white_24;
drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId);
hdCall = drawable.mutate();
- hdCall.setColorFilter(r.getColor(R.color.icon_color_grey), PorterDuff.Mode.MULTIPLY);
+ hdCall.setColorFilter(ThemeUtil.getColorIcon(), PorterDuff.Mode.MULTIPLY);
iconId = R.drawable.quantum_ic_signal_wifi_4_bar_white_24;
drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId);
wifiCall = drawable.mutate();
- wifiCall.setColorFilter(r.getColor(R.color.icon_color_grey), PorterDuff.Mode.MULTIPLY);
+ wifiCall.setColorFilter(ThemeUtil.getColorIcon(), PorterDuff.Mode.MULTIPLY);
iconId = R.drawable.quantum_ic_language_white_24;
drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId);
assistedDialedCall = drawable.mutate();
- assistedDialedCall.setColorFilter(
- r.getColor(R.color.icon_color_grey), PorterDuff.Mode.MULTIPLY);
+ assistedDialedCall.setColorFilter(ThemeUtil.getColorIcon(), PorterDuff.Mode.MULTIPLY);
iconId = R.drawable.quantum_ic_rtt_vd_theme_24;
drawable = largeIcons ? r.getDrawable(iconId, null) : getScaledBitmap(context, iconId);
rttCall = drawable.mutate();
- rttCall.setColorFilter(r.getColor(R.color.icon_color_grey), PorterDuff.Mode.MULTIPLY);
+ rttCall.setColorFilter(ThemeUtil.getColorIcon(), PorterDuff.Mode.MULTIPLY);
iconMargin = largeIcons ? 0 : r.getDimensionPixelSize(R.dimen.call_log_icon_margin);
}
diff --git a/java/com/android/dialer/calllogutils/res/values/colors.xml b/java/com/android/dialer/calllogutils/res/values/colors.xml
index e0e6fb2..8662163 100644
--- a/java/com/android/dialer/calllogutils/res/values/colors.xml
+++ b/java/com/android/dialer/calllogutils/res/values/colors.xml
@@ -19,6 +19,4 @@
<color name="missed_call">#C53929</color>
<!-- Color for answered or outgoing call icons. -->
<color name="answered_call">#00c853</color>
- <!-- Color for blocked call icons. -->
- <color name="blocked_call">@color/dialer_secondary_text_color</color>
</resources>
\ No newline at end of file
diff --git a/java/com/android/dialer/contactsfragment/res/drawable/fast_scroller_container_background.xml b/java/com/android/dialer/contactsfragment/res/drawable/fast_scroller_container_background.xml
index a7b2277..87d123a 100644
--- a/java/com/android/dialer/contactsfragment/res/drawable/fast_scroller_container_background.xml
+++ b/java/com/android/dialer/contactsfragment/res/drawable/fast_scroller_container_background.xml
@@ -16,7 +16,7 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
- <solid android:color="@color/dialer_theme_color"/>
+ <solid android:color="?android:attr/colorPrimary"/>
<size
android:height="@dimen/fast_scroller_container_size"
android:width="@dimen/fast_scroller_container_size"/>
diff --git a/java/com/android/dialer/contactsfragment/res/drawable/fast_scroller_scroll_bar.xml b/java/com/android/dialer/contactsfragment/res/drawable/fast_scroller_scroll_bar.xml
index a3e0c25..4683616 100644
--- a/java/com/android/dialer/contactsfragment/res/drawable/fast_scroller_scroll_bar.xml
+++ b/java/com/android/dialer/contactsfragment/res/drawable/fast_scroller_scroll_bar.xml
@@ -17,7 +17,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true">
<shape android:shape="rectangle">
- <solid android:color="@color/dialer_theme_color"/>
+ <solid android:color="?android:attr/colorPrimary"/>
<size android:height="32dp" android:width="4dp"/>
<corners android:radius="2dp"/>
</shape>
diff --git a/java/com/android/dialer/contactsfragment/res/layout/add_contact_row.xml b/java/com/android/dialer/contactsfragment/res/layout/add_contact_row.xml
index dbc7caf..bc5f712 100644
--- a/java/com/android/dialer/contactsfragment/res/layout/add_contact_row.xml
+++ b/java/com/android/dialer/contactsfragment/res/layout/add_contact_row.xml
@@ -34,7 +34,7 @@
android:layout_width="@dimen/photo_size"
android:layout_height="@dimen/photo_size"
android:src="@drawable/quantum_ic_person_add_white_24"
- android:tint="@color/dialer_theme_color"
+ android:tint="?android:attr/colorPrimary"
android:scaleType="center"/>
<TextView
@@ -46,5 +46,5 @@
android:gravity="center_vertical"
android:fontFamily="sans-serif"
android:text="@string/all_contacts_empty_add_contact_action"
- style="@style/PrimaryText"/>
+ style="@style/Dialer.TextAppearance.Primary"/>
</LinearLayout>
diff --git a/java/com/android/dialer/contactsfragment/res/layout/fragment_contacts.xml b/java/com/android/dialer/contactsfragment/res/layout/fragment_contacts.xml
index 7bc3b34..8d04fe5 100644
--- a/java/com/android/dialer/contactsfragment/res/layout/fragment_contacts.xml
+++ b/java/com/android/dialer/contactsfragment/res/layout/fragment_contacts.xml
@@ -23,7 +23,7 @@
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/background_dialer_light"
+ android:background="?android:attr/colorBackgroundFloating"
android:paddingBottom="@dimen/floating_action_button_list_bottom_padding"
android:clipToPadding="false"/>
@@ -45,7 +45,7 @@
android:layout_toLeftOf="@+id/fast_scroller_scroll_bar"
android:gravity="center"
android:textSize="48sp"
- android:textColor="@color/background_dialer_white"
+ android:textColor="?android:attr/colorBackground"
android:visibility="gone"
android:background="@drawable/fast_scroller_container_background"/>
diff --git a/java/com/android/dialer/contactsfragment/res/layout/header.xml b/java/com/android/dialer/contactsfragment/res/layout/header.xml
index cb5e78a..e75c7dc 100644
--- a/java/com/android/dialer/contactsfragment/res/layout/header.xml
+++ b/java/com/android/dialer/contactsfragment/res/layout/header.xml
@@ -19,7 +19,7 @@
android:id="@+id/header"
android:layout_width="@dimen/header_width"
android:layout_height="@dimen/row_height"
- android:textColor="@color/dialer_theme_color"
+ android:textColor="?android:attr/colorPrimary"
android:gravity="center"
android:textSize="@dimen/text_size"
android:textStyle="bold"
diff --git a/java/com/android/dialer/dialpadview/res/layout-land/dialpad_fragment.xml b/java/com/android/dialer/dialpadview/res/layout-land/dialpad_fragment.xml
index a2fbbab..7f82d74 100644
--- a/java/com/android/dialer/dialpadview/res/layout-land/dialpad_fragment.xml
+++ b/java/com/android/dialer/dialpadview/res/layout-land/dialpad_fragment.xml
@@ -57,7 +57,7 @@
android:id="@+id/dialpadChooser"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@color/background_dialer_light"
+ android:background="?android:attr/colorBackgroundFloating"
android:visibility="gone"/>
<!-- Margin bottom and alignParentBottom don't work well together, so use a Space instead. -->
diff --git a/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_one.xml b/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_one.xml
index 0a770c2..55bf092 100644
--- a/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_one.xml
+++ b/java/com/android/dialer/dialpadview/res/layout-land/dialpad_key_one.xml
@@ -46,7 +46,7 @@
android:layout_height="@dimen/dialpad_voicemail_icon_size"
android:scaleType="fitCenter"
android:src="@drawable/quantum_ic_voicemail_white_24"
- android:tint="@color/dialpad_voicemail_tint"/>
+ android:tint="?colorIcon"/>
</LinearLayout>
<!-- A placeholder to make the width the same as other dialpad keys. -->
diff --git a/java/com/android/dialer/dialpadview/res/layout/dialpad_chooser_list_item.xml b/java/com/android/dialer/dialpadview/res/layout/dialpad_chooser_list_item.xml
index e005296..43df76f 100644
--- a/java/com/android/dialer/dialpadview/res/layout/dialpad_chooser_list_item.xml
+++ b/java/com/android/dialer/dialpadview/res/layout/dialpad_chooser_list_item.xml
@@ -33,6 +33,5 @@
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="@color/dialpad_primary_text_color"/>
-
+ android:textColor="?android:attr/colorPrimary"/>
</LinearLayout>
diff --git a/java/com/android/dialer/dialpadview/res/layout/dialpad_fragment.xml b/java/com/android/dialer/dialpadview/res/layout/dialpad_fragment.xml
index 4a8ac07..d3ebeb0 100644
--- a/java/com/android/dialer/dialpadview/res/layout/dialpad_fragment.xml
+++ b/java/com/android/dialer/dialpadview/res/layout/dialpad_fragment.xml
@@ -46,7 +46,7 @@
android:id="@+id/dialpadChooser"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@color/background_dialer_light"
+ android:background="?android:attr/colorBackgroundFloating"
android:visibility="gone"/>
</LinearLayout>
diff --git a/java/com/android/dialer/dialpadview/res/layout/dialpad_key_one.xml b/java/com/android/dialer/dialpadview/res/layout/dialpad_key_one.xml
index 599c2d8..0d8a0f0 100644
--- a/java/com/android/dialer/dialpadview/res/layout/dialpad_key_one.xml
+++ b/java/com/android/dialer/dialpadview/res/layout/dialpad_key_one.xml
@@ -46,7 +46,7 @@
android:layout_height="@dimen/dialpad_voicemail_icon_size"
android:scaleType="fitCenter"
android:src="@drawable/quantum_ic_voicemail_white_24"
- android:tint="?attr/dialpad_voicemail_tint"/>
+ android:tint="?colorIcon"/>
</LinearLayout>
</LinearLayout>
</com.android.dialer.dialpadview.DialpadKeyButton>
diff --git a/java/com/android/dialer/dialpadview/res/values/colors.xml b/java/com/android/dialer/dialpadview/res/values/colors.xml
deleted file mode 100644
index 8bea357..0000000
--- a/java/com/android/dialer/dialpadview/res/values/colors.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
- ~ 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.
- ~ 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>
- <!-- Colors for the dialpad -->
- <color name="background_dialpad">#fcfcfc</color>
- <color name="dialpad_primary_text_color">@color/dialer_theme_color</color>
- <color name="dialpad_secondary_text_color">#737373</color>
- <color name="dialpad_digits_text_color">#333</color>
- <color name="dialpad_icon_tint">#89000000</color>
- <color name="dialpad_voicemail_tint">#919191</color>
-</resources>
diff --git a/java/com/android/dialer/dialpadview/res/values/dimens.xml b/java/com/android/dialer/dialpadview/res/values/dimens.xml
index 6892fcf..f77c9ab 100644
--- a/java/com/android/dialer/dialpadview/res/values/dimens.xml
+++ b/java/com/android/dialer/dialpadview/res/values/dimens.xml
@@ -16,17 +16,11 @@
<resources>
<!-- Text dimensions for dialpad keys -->
- <dimen name="dialpad_key_numbers_default_size">36dp</dimen>
- <dimen name="dialpad_key_letters_default_size_for_single_alphabet">12sp</dimen>
- <dimen name="dialpad_key_letters_default_size_for_dual_alphabets">10sp</dimen>
<dimen name="dialpad_key_pound_size">23sp</dimen>
<dimen name="dialpad_key_star_size">36sp</dimen>
<dimen name="dialpad_key_height">64dp</dimen>
- <dimen name="dialpad_key_number_default_margin_bottom">3dp</dimen>
<dimen name="dialpad_symbol_margin_bottom">13dp</dimen>
- <dimen name="dialpad_digits_text_size">34sp</dimen>
<dimen name="dialpad_digits_text_min_size">24sp</dimen>
- <dimen name="dialpad_digits_height">60dp</dimen>
<dimen name="dialpad_digits_padding">16dp</dimen>
<dimen name="dialpad_digits_menu_left_padding">8dp</dimen>
<dimen name="dialpad_digits_menu_right_padding">10dp</dimen>
@@ -35,8 +29,6 @@
<dimen name="dialpad_overflow_margin">8dp</dimen>
<dimen name="dialpad_space_above_keys">14dp</dimen>
<dimen name="dialpad_space_below_keys">8dp</dimen>
- <!-- The bottom space of the dialpad to account for the dial button -->
- <dimen name="dialpad_bottom_space_height">80dp</dimen>
<!-- Top/Bottom padding around the ILD rate display box. -->
<dimen name="ild_margin_height">10dp</dimen>
diff --git a/java/com/android/dialer/dialpadview/res/values/styles.xml b/java/com/android/dialer/dialpadview/res/values/styles.xml
index 75a54a3..071c4bd 100644
--- a/java/com/android/dialer/dialpadview/res/values/styles.xml
+++ b/java/com/android/dialer/dialpadview/res/values/styles.xml
@@ -82,43 +82,8 @@
<item name="android:orientation">vertical</item>
</style>
- <style name="Dialpad">
- <item name="dialpad_digits_adjustable_height">@dimen/dialpad_digits_height</item>
- <item name="dialpad_digits_adjustable_text_size">@dimen/dialpad_digits_text_size</item>
- <item name="dialpad_key_letters_size_for_dual_alphabets">
- @dimen/dialpad_key_letters_default_size_for_dual_alphabets
- </item>
- <item name="dialpad_key_letters_size_for_single_alphabet">
- @dimen/dialpad_key_letters_default_size_for_single_alphabet
- </item>
- <item name="dialpad_key_numbers_size">@dimen/dialpad_key_numbers_default_size</item>
- <item name="dialpad_key_number_margin_bottom">
- @dimen/dialpad_key_number_default_margin_bottom
- </item>
- <item name="dialpad_end_key_spacing">@dimen/dialpad_bottom_space_height</item>
- <item name="dialpad_elevation">0dp</item>
- </style>
-
- <style name="Dialpad.Light">
- <item name="dialpad_text_color">@color/dialpad_digits_text_color</item>
- <item name="dialpad_text_color_primary">@color/dialpad_primary_text_color</item>
- <item name="dialpad_text_color_secondary">@color/dialpad_secondary_text_color</item>
- <item name="dialpad_icon_tint">@color/dialpad_icon_tint</item>
- <item name="dialpad_voicemail_tint">@color/dialpad_voicemail_tint</item>
- <item name="dialpad_background">@color/background_dialpad</item>
- </style>
-
- <style name="Dialpad.Dark">
- <item name="dialpad_text_color">@android:color/white</item>
- <item name="dialpad_text_color_primary">@android:color/white</item>
- <item name="dialpad_text_color_secondary">#ffd4d6d7</item>
- <item name="dialpad_icon_tint">@android:color/white</item>
- <item name="dialpad_voicemail_tint">?attr/dialpad_text_color_secondary</item>
- <item name="dialpad_background">#00000000</item>
- </style>
-
<style name="DeviceIdBody">
- <item name="android:textColor">?android:textColorPrimary</item>
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">16sp</item>
</style>
</resources>
diff --git a/java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml b/java/com/android/dialer/dialpadview/theme/AndroidManifest.xml
similarity index 73%
copy from java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml
copy to java/com/android/dialer/dialpadview/theme/AndroidManifest.xml
index b858b4f..f0726d0 100644
--- a/java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml
+++ b/java/com/android/dialer/dialpadview/theme/AndroidManifest.xml
@@ -1,4 +1,3 @@
-<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2018 The Android Open Source Project
~
@@ -14,7 +13,4 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
-<resources>
- <color name="bottom_nav_icon_selected">@color/dialer_theme_color</color>
- <color name="bottom_nav_icon_deselected">@color/dialer_secondary_text_color</color>
-</resources>
+<manifest package="com.android.dialer.dialpadview.theme"/>
diff --git a/java/com/android/dialer/dialpadview/res/values/attrs.xml b/java/com/android/dialer/dialpadview/theme/res/values/attr.xml
similarity index 92%
rename from java/com/android/dialer/dialpadview/res/values/attrs.xml
rename to java/com/android/dialer/dialpadview/theme/res/values/attr.xml
index 61c9c20..99707aa 100644
--- a/java/com/android/dialer/dialpadview/res/values/attrs.xml
+++ b/java/com/android/dialer/dialpadview/theme/res/values/attr.xml
@@ -1,5 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
<!--
- ~ Copyright (C) 2012 The Android Open Source Project
+ ~ 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.
@@ -11,11 +12,9 @@
~ 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.
+ ~ limitations under the License
-->
-
<resources>
-
<attr format="reference" name="dialpad_style"/>
<attr format="dimension" name="dialpad_end_key_spacing"/>
diff --git a/java/com/android/dialer/dialpadview/theme/res/values/dimens.xml b/java/com/android/dialer/dialpadview/theme/res/values/dimens.xml
new file mode 100644
index 0000000..e90ee1c
--- /dev/null
+++ b/java/com/android/dialer/dialpadview/theme/res/values/dimens.xml
@@ -0,0 +1,27 @@
+<?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>
+ <!-- Text dimensions for dialpad keys -->
+ <dimen name="dialpad_key_numbers_default_size">36dp</dimen>
+ <dimen name="dialpad_key_letters_default_size_for_single_alphabet">12sp</dimen>
+ <dimen name="dialpad_key_letters_default_size_for_dual_alphabets">10sp</dimen>
+ <dimen name="dialpad_key_number_default_margin_bottom">3dp</dimen>
+ <dimen name="dialpad_digits_text_size">34sp</dimen>
+ <dimen name="dialpad_digits_height">60dp</dimen>
+ <!-- The bottom space of the dialpad to account for the dial button -->
+ <dimen name="dialpad_bottom_space_height">80dp</dimen>
+</resources>
\ No newline at end of file
diff --git a/java/com/android/dialer/dialpadview/theme/res/values/styles.xml b/java/com/android/dialer/dialpadview/theme/res/values/styles.xml
new file mode 100644
index 0000000..408a33d
--- /dev/null
+++ b/java/com/android/dialer/dialpadview/theme/res/values/styles.xml
@@ -0,0 +1,51 @@
+<?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="Dialpad">
+ <item name="dialpad_digits_adjustable_height">@dimen/dialpad_digits_height</item>
+ <item name="dialpad_digits_adjustable_text_size">@dimen/dialpad_digits_text_size</item>
+ <item name="dialpad_key_letters_size_for_dual_alphabets">
+ @dimen/dialpad_key_letters_default_size_for_dual_alphabets
+ </item>
+ <item name="dialpad_key_letters_size_for_single_alphabet">
+ @dimen/dialpad_key_letters_default_size_for_single_alphabet
+ </item>
+ <item name="dialpad_key_numbers_size">@dimen/dialpad_key_numbers_default_size</item>
+ <item name="dialpad_key_number_margin_bottom">
+ @dimen/dialpad_key_number_default_margin_bottom
+ </item>
+ <item name="dialpad_end_key_spacing">@dimen/dialpad_bottom_space_height</item>
+ <item name="dialpad_elevation">0dp</item>
+ </style>
+
+ <style name="Dialpad.Light">
+ <item name="dialpad_text_color">?android:attr/textColorSecondary</item>
+ <item name="dialpad_text_color_primary">?android:attr/colorPrimary</item>
+ <item name="dialpad_text_color_secondary">?android:attr/textColorSecondary</item>
+ <item name="dialpad_icon_tint">?colorIcon</item>
+ <item name="dialpad_voicemail_tint">?colorIcon</item>
+ <item name="dialpad_background">?android:attr/colorBackgroundFloating</item>
+ </style>
+
+ <style name="Dialpad.Dark">
+ <item name="dialpad_text_color">@android:color/white</item>
+ <item name="dialpad_text_color_primary">@android:color/white</item>
+ <item name="dialpad_text_color_secondary">#ffd4d6d7</item>
+ <item name="dialpad_icon_tint">@android:color/white</item>
+ <item name="dialpad_background">#00000000</item>
+ </style>
+</resources>
\ No newline at end of file
diff --git a/java/com/android/dialer/enrichedcall/simulator/AndroidManifest.xml b/java/com/android/dialer/enrichedcall/simulator/AndroidManifest.xml
index 003ff19..e5e5a42 100644
--- a/java/com/android/dialer/enrichedcall/simulator/AndroidManifest.xml
+++ b/java/com/android/dialer/enrichedcall/simulator/AndroidManifest.xml
@@ -16,11 +16,11 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.dialer.calldetails">
- <application android:theme="@style/Theme.AppCompat">
- <activity
+ <application>
+ <activity
android:label="@string/enriched_call_simulator_activity"
android:name="com.android.dialer.enrichedcall.simulator.EnrichedCallSimulatorActivity"
- android:theme="@style/DialerThemeBase.NoActionBar">
+ android:theme="@style/Dialer.ThemeBase.NoActionBar">
</activity>
</application>
</manifest>
diff --git a/java/com/android/dialer/historyitemactions/res/layout/contact_layout.xml b/java/com/android/dialer/historyitemactions/res/layout/contact_layout.xml
index 89cb914..5fe4093 100644
--- a/java/com/android/dialer/historyitemactions/res/layout/contact_layout.xml
+++ b/java/com/android/dialer/historyitemactions/res/layout/contact_layout.xml
@@ -40,13 +40,13 @@
<TextView
android:id="@+id/primary_text"
- style="@style/PrimaryText"
+ style="@style/Dialer.TextAppearance.Primary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/secondary_text"
- style="@style/SecondaryText"
+ style="@style/Dialer.TextAppearance.Secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"/>
diff --git a/java/com/android/dialer/historyitemactions/res/layout/module_layout.xml b/java/com/android/dialer/historyitemactions/res/layout/module_layout.xml
index 0630519..6b54e5e 100644
--- a/java/com/android/dialer/historyitemactions/res/layout/module_layout.xml
+++ b/java/com/android/dialer/historyitemactions/res/layout/module_layout.xml
@@ -35,5 +35,5 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
- style="@style/PrimaryText"/>
+ style="@style/Dialer.TextAppearance.Primary"/>
</LinearLayout>
\ No newline at end of file
diff --git a/java/com/android/dialer/historyitemactions/res/values/styles.xml b/java/com/android/dialer/historyitemactions/res/values/styles.xml
index ed3cf11..98e2ec9 100644
--- a/java/com/android/dialer/historyitemactions/res/values/styles.xml
+++ b/java/com/android/dialer/historyitemactions/res/values/styles.xml
@@ -19,7 +19,7 @@
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowTranslucentNavigation">false</item>
<item name="android:windowTranslucentStatus">false</item>
- <item name="android:navigationBarColor">@color/background_dialer_white</item>
+ <item name="android:navigationBarColor">?android:attr/colorBackground</item>
</style>
<style name="HistoryItemBottomSheet" parent="HistoryItemBottomSheet.Base">
diff --git a/java/com/android/dialer/inject/ContextModule.java b/java/com/android/dialer/inject/ContextModule.java
index 828f978..12ba12b 100644
--- a/java/com/android/dialer/inject/ContextModule.java
+++ b/java/com/android/dialer/inject/ContextModule.java
@@ -18,7 +18,7 @@
import android.content.Context;
import android.support.annotation.NonNull;
-import com.android.dialer.common.Assert;
+import com.android.dialer.theme.ThemeUtil;
import dagger.Module;
import dagger.Provides;
@@ -30,7 +30,8 @@
@NonNull private final Context context;
public ContextModule(@NonNull Context appContext) {
- this.context = Assert.isNotNull(appContext);
+ ThemeUtil.initializeTheme(appContext);
+ this.context = ThemeUtil.getThemedContext(appContext);
}
@Provides
diff --git a/java/com/android/dialer/main/impl/AndroidManifest.xml b/java/com/android/dialer/main/impl/AndroidManifest.xml
index d140773..f0f338a 100644
--- a/java/com/android/dialer/main/impl/AndroidManifest.xml
+++ b/java/com/android/dialer/main/impl/AndroidManifest.xml
@@ -19,6 +19,7 @@
<application>
+ <!-- TODO(a bug): remove activity themes and only have application wide themes -->
<activity
android:clearTaskOnLaunch="true"
android:exported="true"
@@ -27,7 +28,7 @@
android:launchMode="singleTask"
android:name="com.android.dialer.main.impl.MainActivity"
android:resizeableActivity="true"
- android:theme="@style/NuiActivityTheme"
+ android:theme="@style/MainActivityTheme"
android:windowSoftInputMode="stateAlwaysHidden|adjustNothing">
<meta-data
diff --git a/java/com/android/dialer/main/impl/MainActivity.java b/java/com/android/dialer/main/impl/MainActivity.java
index 2046b04..1129609 100644
--- a/java/com/android/dialer/main/impl/MainActivity.java
+++ b/java/com/android/dialer/main/impl/MainActivity.java
@@ -78,7 +78,8 @@
activePeer = getNewPeer();
activePeer.onActivityCreate(savedInstanceState);
- showBlockReportSpamDialogReceiver = new ShowBlockReportSpamDialogReceiver(getFragmentManager());
+ showBlockReportSpamDialogReceiver =
+ new ShowBlockReportSpamDialogReceiver(getSupportFragmentManager());
}
protected MainActivityPeer getNewPeer() {
diff --git a/java/com/android/dialer/main/impl/bottomnav/BottomNavItem.java b/java/com/android/dialer/main/impl/bottomnav/BottomNavItem.java
index 2519d23..4edb08e 100644
--- a/java/com/android/dialer/main/impl/bottomnav/BottomNavItem.java
+++ b/java/com/android/dialer/main/impl/bottomnav/BottomNavItem.java
@@ -30,6 +30,7 @@
import android.widget.TextView;
import com.android.dialer.common.Assert;
import com.android.dialer.configprovider.ConfigProviderBindings;
+import com.android.dialer.theme.ThemeUtil;
/** Navigation item in a bottom nav. */
final class BottomNavItem extends LinearLayout {
@@ -53,10 +54,9 @@
@Override
public void setSelected(boolean selected) {
super.setSelected(selected);
- int colorId = selected ? R.color.bottom_nav_icon_selected : R.color.bottom_nav_icon_deselected;
- int color = getContext().getColor(colorId);
- image.setImageTintList(ColorStateList.valueOf(color));
- text.setTextColor(color);
+ int colorId = selected ? ThemeUtil.getColorPrimary() : ThemeUtil.getTextColorSecondary();
+ image.setImageTintList(ColorStateList.valueOf(colorId));
+ text.setTextColor(colorId);
}
void setup(@StringRes int stringRes, @DrawableRes int drawableRes) {
diff --git a/java/com/android/dialer/main/impl/bottomnav/res/drawable/notification_badge.xml b/java/com/android/dialer/main/impl/bottomnav/res/drawable/notification_badge.xml
index 59a967a..dad566b 100644
--- a/java/com/android/dialer/main/impl/bottomnav/res/drawable/notification_badge.xml
+++ b/java/com/android/dialer/main/impl/bottomnav/res/drawable/notification_badge.xml
@@ -17,7 +17,7 @@
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
- <solid android:color="@color/dialer_theme_color"/>
+ <solid android:color="?android:attr/colorPrimary"/>
<corners android:radius="20dp"/>
- <stroke android:color="@color/background_dialer_white" android:width="2dp"/>
+ <stroke android:color="?android:attr/colorBackground" android:width="2dp"/>
</shape>
\ No newline at end of file
diff --git a/java/com/android/dialer/main/impl/bottomnav/res/layout/bottom_nav_bar_layout.xml b/java/com/android/dialer/main/impl/bottomnav/res/layout/bottom_nav_bar_layout.xml
index 02ba3ab..1dd60d8 100644
--- a/java/com/android/dialer/main/impl/bottomnav/res/layout/bottom_nav_bar_layout.xml
+++ b/java/com/android/dialer/main/impl/bottomnav/res/layout/bottom_nav_bar_layout.xml
@@ -19,7 +19,7 @@
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@color/background_dialer_white"
+ android:background="?android:attr/colorBackgroundFloating"
android:elevation="8dp">
<include
diff --git a/java/com/android/dialer/main/impl/bottomnav/res/layout/bottom_nav_item.xml b/java/com/android/dialer/main/impl/bottomnav/res/layout/bottom_nav_item.xml
index cb4c6b6..2197b4d 100644
--- a/java/com/android/dialer/main/impl/bottomnav/res/layout/bottom_nav_item.xml
+++ b/java/com/android/dialer/main/impl/bottomnav/res/layout/bottom_nav_item.xml
@@ -22,7 +22,7 @@
android:minWidth="80dp"
android:minHeight="56dp"
android:gravity="center"
- android:background="?android:selectableItemBackgroundBorderless">
+ android:background="?android:attr/selectableItemBackgroundBorderless">
<FrameLayout
android:layout_width="wrap_content"
@@ -47,7 +47,7 @@
android:minWidth="20dp"
android:gravity="center"
android:textSize="12sp"
- android:textColor="@color/dialer_primary_text_color_white"
+ android:textColor="?android:attr/textColorPrimaryInverse"
android:background="@drawable/notification_badge"
android:fontFamily="sans-serif-medium"
android:visibility="invisible"/>
@@ -59,6 +59,6 @@
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:textSize="12sp"
- android:textColor="@color/dialer_theme_color"
+ android:textColor="?android:attr/colorPrimary"
android:gravity="center_horizontal"/>
</com.android.dialer.main.impl.bottomnav.BottomNavItem>
\ No newline at end of file
diff --git a/java/com/android/dialer/main/impl/res/layout/promotion_bottom_sheet.xml b/java/com/android/dialer/main/impl/res/layout/promotion_bottom_sheet.xml
index 3f1e709..c7f2d9a 100644
--- a/java/com/android/dialer/main/impl/res/layout/promotion_bottom_sheet.xml
+++ b/java/com/android/dialer/main/impl/res/layout/promotion_bottom_sheet.xml
@@ -37,7 +37,7 @@
android:id="@+id/promotion_icon"
android:layout_width="36dp"
android:layout_height="36dp"
- android:tint="@color/dialer_theme_color"/>
+ android:tint="?android:attr/colorPrimary"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -70,7 +70,7 @@
android:layout_gravity="end"
android:paddingStart="16dp"
android:paddingEnd="16dp"
- android:backgroundTint="@color/dialer_theme_color"
+ android:backgroundTint="?android:attr/colorPrimary"
android:fontFamily="sans-serif-medium"
android:stateListAnimator="@null"
android:text="@string/ok_got_it"
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 86e6f28..9462bbc 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
@@ -17,10 +17,11 @@
<resources>
<!-- Used on sdk 27 and above -->
- <style name="NuiActivityTheme" parent="NuiActivityThemeBase">
+ <!-- TODO(a bug): refactor into dialer/theme -->
+ <style name="MainActivityTheme" parent="MainActivityThemeBase">
<!-- Used to change the navigation bar color -->
<item name="android:windowLightNavigationBar">true</item>
- <item name="android:navigationBarColor">@color/background_dialer_white</item>
+ <item name="android:navigationBarColor">?android:attr/colorBackgroundFloating</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/strings.xml b/java/com/android/dialer/main/impl/res/values/strings.xml
index 1218203..cde78e6 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 387b1d7..467cb5b 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>
diff --git a/java/com/android/dialer/main/impl/toolbar/res/drawable/custom_cursor.xml b/java/com/android/dialer/main/impl/toolbar/res/drawable/custom_cursor.xml
index 008b0a3..f352901 100644
--- a/java/com/android/dialer/main/impl/toolbar/res/drawable/custom_cursor.xml
+++ b/java/com/android/dialer/main/impl/toolbar/res/drawable/custom_cursor.xml
@@ -16,5 +16,5 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<size android:width="2dp"/>
- <solid android:color="@color/dialtacts_theme_color"/>
+ <solid android:color="?android:attr/colorPrimary"/>
</shape>
\ No newline at end of file
diff --git a/java/com/android/dialer/main/impl/toolbar/res/drawable/search_bar_background.xml b/java/com/android/dialer/main/impl/toolbar/res/drawable/search_bar_background.xml
index 8767057..8bc21c4 100644
--- a/java/com/android/dialer/main/impl/toolbar/res/drawable/search_bar_background.xml
+++ b/java/com/android/dialer/main/impl/toolbar/res/drawable/search_bar_background.xml
@@ -16,5 +16,5 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
- <solid android:color="@color/background_dialer_white"/>
+ <solid android:color="?android:attr/colorBackground"/>
</shape>
diff --git a/java/com/android/dialer/main/impl/toolbar/res/drawable/search_bar_background_rounded_corners.xml b/java/com/android/dialer/main/impl/toolbar/res/drawable/search_bar_background_rounded_corners.xml
index 58cdabe..2bbc8d1 100644
--- a/java/com/android/dialer/main/impl/toolbar/res/drawable/search_bar_background_rounded_corners.xml
+++ b/java/com/android/dialer/main/impl/toolbar/res/drawable/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="@color/background_dialer_white"/>
+ <solid android:color="?android:attr/colorBackground"/>
<corners android:radius="2dp"/>
</shape>
diff --git a/java/com/android/dialer/main/impl/toolbar/res/layout/expanded_search_bar.xml b/java/com/android/dialer/main/impl/toolbar/res/layout/expanded_search_bar.xml
index 3bd71b6..8a8730f 100644
--- a/java/com/android/dialer/main/impl/toolbar/res/layout/expanded_search_bar.xml
+++ b/java/com/android/dialer/main/impl/toolbar/res/layout/expanded_search_bar.xml
@@ -29,7 +29,7 @@
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/action_menu_back_from_search"
android:src="@drawable/quantum_ic_arrow_back_vd_theme_24"
- android:tint="@color/dialer_theme_color"/>
+ android:tint="?android:attr/colorPrimary"/>
<EditText
android:id="@+id/search_view"
@@ -46,7 +46,7 @@
android:maxLines="1"
android:hint="@string/dialer_hint_find_contact"
android:textColor="@color/dialer_secondary_text_color"
- android:textColorHint="@color/dialer_edit_text_hint_color"
+ android:textColorHint="?android:attr/textColorHint"
android:textCursorDrawable="@drawable/custom_cursor"
android:textSize="16sp"/>
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 d63fdfe..98b8563 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,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="@dimen/expanded_search_bar_height"
- android:background="@color/dialer_theme_color"
+ android:background="?android:attr/colorPrimary"
app:contentInsetEnd="0dp"
app:contentInsetStart="0dp">
<FrameLayout
@@ -38,7 +38,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
- android:background="?android:selectableItemBackground"
+ android:background="?android:attr/selectableItemBackground"
android:gravity="center_vertical">
<ImageView
@@ -110,7 +110,7 @@
android:id="@+id/remove_view_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/dialer_theme_color"
+ android:background="?android:attr/colorPrimary"
android:gravity="center"
android:orientation="horizontal"
android:visibility="gone">
@@ -122,14 +122,14 @@
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:src="@drawable/quantum_ic_close_vd_theme_24"
- android:tint="@color/dialer_primary_text_color_white"/>
+ android:tint="?android:attr/textColorPrimaryInverse"/>
<TextView
android:id="@+id/remove_view_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/main_remove_contact"
- android:textColor="@color/dialer_primary_text_color_white"
+ android:textColor="?android:attr/textColorPrimaryInverse"
android:textSize="16sp"/>
</LinearLayout>
</com.android.dialer.app.list.RemoveView>
diff --git a/java/com/android/dialer/postcall/AndroidManifest.xml b/java/com/android/dialer/postcall/AndroidManifest.xml
index a097505..82101a0 100644
--- a/java/com/android/dialer/postcall/AndroidManifest.xml
+++ b/java/com/android/dialer/postcall/AndroidManifest.xml
@@ -17,11 +17,11 @@
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.dialer.postcall">
- <application android:theme="@style/Theme.AppCompat">
- <activity
+ <application>
+ <activity
android:name="com.android.dialer.postcall.PostCallActivity"
android:exported="false"
- android:theme="@style/DialerThemeBase.NoActionBar"
+ android:theme="@style/Dialer.ThemeBase.NoActionBar"
android:windowSoftInputMode="adjustResize"/>
</application>
</manifest>
diff --git a/java/com/android/dialer/postcall/res/layout/post_call_activity.xml b/java/com/android/dialer/postcall/res/layout/post_call_activity.xml
index c42764e..94df324 100644
--- a/java/com/android/dialer/postcall/res/layout/post_call_activity.xml
+++ b/java/com/android/dialer/postcall/res/layout/post_call_activity.xml
@@ -19,7 +19,7 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/background_dialer_white">
+ android:background="?android:attr/colorBackground">
<com.android.dialer.widget.DialerToolbar
android:id="@+id/toolbar"
@@ -30,5 +30,5 @@
android:id="@+id/message_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/background_dialer_white"/>
+ android:background="?android:attr/colorBackground"/>
</LinearLayout>
\ No newline at end of file
diff --git a/java/com/android/dialer/precall/impl/res/values/styles.xml b/java/com/android/dialer/precall/impl/res/values/styles.xml
deleted file mode 100644
index dd41265..0000000
--- a/java/com/android/dialer/precall/impl/res/values/styles.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2017 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="Theme.PreCall.DialogHolder" parent="DialerThemeBase.NoActionBar">
- <item name="android:windowBackground">@android:color/transparent</item>
- <item name="android:windowActivityTransitions">false</item>
- <item name="android:windowIsTranslucent">true</item>
-
- <item name="android:statusBarColor">@android:color/transparent</item>
- <item name="android:navigationBarColor">@android:color/transparent</item>
- <item name="android:windowDrawsSystemBarBackgrounds">true</item>
- </style>
-
-</resources>
diff --git a/java/com/android/dialer/rtt/AndroidManifest.xml b/java/com/android/dialer/rtt/AndroidManifest.xml
index c92fb1c..ecc4fe1 100644
--- a/java/com/android/dialer/rtt/AndroidManifest.xml
+++ b/java/com/android/dialer/rtt/AndroidManifest.xml
@@ -16,6 +16,7 @@
<manifest package="com.android.dialer.rtt"
xmlns:android="http://schemas.android.com/apk/res/android">
<application>
- <activity android:name=".RttTranscriptActivity" />
+ <!-- TODO(a bug): remove the theme here. Needed for espresso test. -->
+ <activity android:name=".RttTranscriptActivity" android:theme="@style/Dialer.ThemeBase"/>
</application>
</manifest>
\ No newline at end of file
diff --git a/java/com/android/dialer/searchfragment/common/res/layout/search_contact_row.xml b/java/com/android/dialer/searchfragment/common/res/layout/search_contact_row.xml
index a0d9dd2..fb6f66c 100644
--- a/java/com/android/dialer/searchfragment/common/res/layout/search_contact_row.xml
+++ b/java/com/android/dialer/searchfragment/common/res/layout/search_contact_row.xml
@@ -45,7 +45,7 @@
android:layout_height="wrap_content"
android:gravity="center_vertical|start"
android:fontFamily="sans-serif"
- style="@style/PrimaryText"/>
+ style="@style/Dialer.TextAppearance.Primary"/>
<com.android.dialer.widget.BidiTextView
android:id="@+id/secondary"
@@ -53,7 +53,7 @@
android:layout_height="wrap_content"
android:gravity="center_vertical|start"
android:fontFamily="sans-serif"
- style="@style/SecondaryText"/>
+ style="@style/Dialer.TextAppearance.Secondary"/>
</LinearLayout>
<ImageView
diff --git a/java/com/android/dialer/searchfragment/list/res/layout/fragment_search.xml b/java/com/android/dialer/searchfragment/list/res/layout/fragment_search.xml
index cde9cb6..ad6151b 100644
--- a/java/com/android/dialer/searchfragment/list/res/layout/fragment_search.xml
+++ b/java/com/android/dialer/searchfragment/list/res/layout/fragment_search.xml
@@ -23,12 +23,12 @@
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/background_dialer_light"/>
+ android:background="?android:attr/colorBackgroundFloating"/>
<com.android.dialer.widget.EmptyContentView
android:id="@+id/empty_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
- android:background="@color/background_dialer_light"/>
+ android:background="?android:attr/colorBackgroundFloating"/>
</FrameLayout>
diff --git a/java/com/android/dialer/searchfragment/list/res/layout/header_layout.xml b/java/com/android/dialer/searchfragment/list/res/layout/header_layout.xml
index 6eb1d2e..b22ddd9 100644
--- a/java/com/android/dialer/searchfragment/list/res/layout/header_layout.xml
+++ b/java/com/android/dialer/searchfragment/list/res/layout/header_layout.xml
@@ -27,5 +27,5 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
- style="@style/SecondaryText"/>
+ style="@style/Dialer.TextAppearance.Secondary"/>
</FrameLayout>
diff --git a/java/com/android/dialer/searchfragment/list/res/layout/search_action_layout.xml b/java/com/android/dialer/searchfragment/list/res/layout/search_action_layout.xml
index 8b366fe..b6e3048 100644
--- a/java/com/android/dialer/searchfragment/list/res/layout/search_action_layout.xml
+++ b/java/com/android/dialer/searchfragment/list/res/layout/search_action_layout.xml
@@ -26,7 +26,7 @@
android:layout_marginStart="8dp"
android:layout_gravity="center_vertical|start"
android:padding="12dp"
- android:tint="@color/dialer_theme_color"/>
+ android:tint="?android:attr/colorPrimary"/>
<TextView
android:id="@+id/search_action_text"
@@ -35,5 +35,5 @@
android:layout_marginStart="72dp"
android:layout_marginEnd="16dp"
android:layout_gravity="center_vertical"
- style="@style/PrimaryText"/>
+ style="@style/Dialer.TextAppearance.Primary"/>
</FrameLayout>
\ No newline at end of file
diff --git a/java/com/android/dialer/searchfragment/nearbyplaces/res/layout/location_permission_row.xml b/java/com/android/dialer/searchfragment/nearbyplaces/res/layout/location_permission_row.xml
index 4373252..a79e588 100644
--- a/java/com/android/dialer/searchfragment/nearbyplaces/res/layout/location_permission_row.xml
+++ b/java/com/android/dialer/searchfragment/nearbyplaces/res/layout/location_permission_row.xml
@@ -72,7 +72,7 @@
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="@string/nearby_places_dismiss"
- android:textColor="@color/dialer_theme_color"
+ android:textColor="?android:attr/colorPrimary"
style="@style/Widget.AppCompat.Button.Borderless"/>
</RelativeLayout>
</android.support.v7.widget.CardView>
\ No newline at end of file
diff --git a/java/com/android/dialer/shortcuts/AndroidManifest.xml b/java/com/android/dialer/shortcuts/AndroidManifest.xml
index f0d19af..c0f07bf 100644
--- a/java/com/android/dialer/shortcuts/AndroidManifest.xml
+++ b/java/com/android/dialer/shortcuts/AndroidManifest.xml
@@ -20,9 +20,9 @@
android:minSdkVersion="24"
android:targetSdkVersion="28"/>
- <application android:theme="@style/Theme.AppCompat">
+ <application>
- <service
+ <service
android:exported="false"
android:name=".PeriodicJobService"
android:permission="android.permission.BIND_JOB_SERVICE"/>
diff --git a/java/com/android/dialer/spam/promo/SpamBlockingPromoDialogFragment.java b/java/com/android/dialer/spam/promo/SpamBlockingPromoDialogFragment.java
index ea54728..dbefc52 100644
--- a/java/com/android/dialer/spam/promo/SpamBlockingPromoDialogFragment.java
+++ b/java/com/android/dialer/spam/promo/SpamBlockingPromoDialogFragment.java
@@ -16,12 +16,12 @@
package com.android.dialer.spam.promo;
-import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.DialogFragment;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.Nullable;
+import android.support.v4.app.DialogFragment;
+import android.support.v7.app.AlertDialog;
/** Dialog for spam blocking on-boarding promotion. */
public class SpamBlockingPromoDialogFragment extends DialogFragment {
@@ -64,7 +64,7 @@
public Dialog onCreateDialog(Bundle savedInstanceState) {
super.onCreateDialog(savedInstanceState);
// Return the newly created dialog
- return new AlertDialog.Builder(getActivity(), R.style.AlertDialogTheme)
+ return new AlertDialog.Builder(getActivity())
.setCancelable(true)
.setTitle(R.string.spam_blocking_promo_title)
.setMessage(R.string.spam_blocking_promo_text)
diff --git a/java/com/android/dialer/spam/promo/SpamBlockingPromoHelper.java b/java/com/android/dialer/spam/promo/SpamBlockingPromoHelper.java
index c7bf536..a24c238 100644
--- a/java/com/android/dialer/spam/promo/SpamBlockingPromoHelper.java
+++ b/java/com/android/dialer/spam/promo/SpamBlockingPromoHelper.java
@@ -17,7 +17,6 @@
package com.android.dialer.spam.promo;
import android.annotation.SuppressLint;
-import android.app.FragmentManager;
import android.app.Notification;
import android.app.Notification.Builder;
import android.app.PendingIntent;
@@ -25,6 +24,7 @@
import android.content.DialogInterface.OnDismissListener;
import android.graphics.drawable.Icon;
import android.support.design.widget.Snackbar;
+import android.support.v4.app.FragmentManager;
import android.support.v4.os.BuildCompat;
import android.view.View;
import android.widget.Toast;
diff --git a/java/com/android/dialer/speeddial/res/drawable/context_menu_background.xml b/java/com/android/dialer/speeddial/res/drawable/context_menu_background.xml
index c828860..2b36457 100644
--- a/java/com/android/dialer/speeddial/res/drawable/context_menu_background.xml
+++ b/java/com/android/dialer/speeddial/res/drawable/context_menu_background.xml
@@ -21,6 +21,6 @@
android:topRightRadius="@dimen/speed_dial_context_menu_corner_radius"
android:bottomLeftRadius="@dimen/speed_dial_context_menu_corner_radius"
android:topLeftRadius="@dimen/speed_dial_context_menu_corner_radius"/>
- <solid android:color="@color/background_dialer_white"/>
+ <solid android:color="?android:attr/colorBackground"/>
<stroke android:color="#0333" android:width="2dp"/>
</shape>
\ No newline at end of file
diff --git a/java/com/android/dialer/speeddial/res/drawable/favorite_icon.xml b/java/com/android/dialer/speeddial/res/drawable/favorite_icon.xml
index 81b018f..565877d 100644
--- a/java/com/android/dialer/speeddial/res/drawable/favorite_icon.xml
+++ b/java/com/android/dialer/speeddial/res/drawable/favorite_icon.xml
@@ -18,6 +18,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
- <solid android:color="@color/dialer_theme_color"/>
- <stroke android:color="@color/background_dialer_light" android:width="3dp"/>
+ <solid android:color="?android:attr/colorPrimary"/>
+ <stroke android:color="?android:attr/colorBackground" android:width="3dp"/>
</shape>
\ No newline at end of file
diff --git a/java/com/android/dialer/speeddial/res/layout/disambig_dialog_layout.xml b/java/com/android/dialer/speeddial/res/layout/disambig_dialog_layout.xml
index aec0813..e395d4b 100644
--- a/java/com/android/dialer/speeddial/res/layout/disambig_dialog_layout.xml
+++ b/java/com/android/dialer/speeddial/res/layout/disambig_dialog_layout.xml
@@ -31,10 +31,8 @@
android:paddingEnd="24dp"
android:elevation="1dp"
android:text="@string/speed_dial_disambig_dialog_title"
- android:textSize="20sp"
- android:textColor="@color/dialer_primary_text_color"
- android:fontFamily="sans-serif-medium"
- android:background="@android:color/white"/>
+ android:background="?android:attr/colorBackgroundFloating"
+ style="@style/Dialer.TextAppearance.Header"/>
<com.android.dialer.widget.MaxHeightScrollView
android:id="@+id/disambig_scrollview"
@@ -57,7 +55,7 @@
android:layout_gravity="bottom"
android:minHeight="64dp"
android:elevation="4dp"
- android:background="@android:color/white">
+ android:background="?android:attr/colorBackgroundFloating">
<CheckBox
android:id="@+id/remember_this_choice_checkbox"
diff --git a/java/com/android/dialer/speeddial/res/layout/disambig_option_header_layout.xml b/java/com/android/dialer/speeddial/res/layout/disambig_option_header_layout.xml
index 22a5d1b..ffda367 100644
--- a/java/com/android/dialer/speeddial/res/layout/disambig_option_header_layout.xml
+++ b/java/com/android/dialer/speeddial/res/layout/disambig_option_header_layout.xml
@@ -23,6 +23,4 @@
android:minHeight="48dp"
android:paddingStart="24dp"
android:paddingEnd="24dp"
- android:textSize="14sp"
- android:textColor="#757575"
- style="@style/PrimaryText"/>
+ style="@style/Dialer.TextAppearance.Secondary"/>
diff --git a/java/com/android/dialer/speeddial/res/layout/disambig_option_layout.xml b/java/com/android/dialer/speeddial/res/layout/disambig_option_layout.xml
index a1a5b29..0388005 100644
--- a/java/com/android/dialer/speeddial/res/layout/disambig_option_layout.xml
+++ b/java/com/android/dialer/speeddial/res/layout/disambig_option_layout.xml
@@ -29,7 +29,7 @@
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center_vertical"
- android:tint="@color/dialer_secondary_text_color"/>
+ android:tint="?colorIcon"/>
<TextView
android:id="@+id/disambig_option_text"
@@ -37,5 +37,5 @@
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_gravity="center_vertical"
- style="@style/PrimaryText"/>
+ style="@style/Dialer.TextAppearance.Primary"/>
</LinearLayout>
\ No newline at end of file
diff --git a/java/com/android/dialer/speeddial/res/layout/favorite_item_layout.xml b/java/com/android/dialer/speeddial/res/layout/favorite_item_layout.xml
index a0bbfbd..a8bc55b 100644
--- a/java/com/android/dialer/speeddial/res/layout/favorite_item_layout.xml
+++ b/java/com/android/dialer/speeddial/res/layout/favorite_item_layout.xml
@@ -68,7 +68,7 @@
android:layout_marginBottom="1dp"
android:fontFamily="sans-serif-medium"
android:textSize="14sp"
- style="@style/PrimaryText"/>
+ style="@style/Dialer.TextAppearance.Primary"/>
<TextView
android:id="@+id/phone_type"
@@ -78,5 +78,5 @@
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_marginBottom="17dp"
- style="@style/SecondaryText"/>
+ style="@style/Dialer.TextAppearance.Secondary"/>
</LinearLayout>
\ No newline at end of file
diff --git a/java/com/android/dialer/speeddial/res/layout/fragment_speed_dial.xml b/java/com/android/dialer/speeddial/res/layout/fragment_speed_dial.xml
index 1e35091..57f8885 100644
--- a/java/com/android/dialer/speeddial/res/layout/fragment_speed_dial.xml
+++ b/java/com/android/dialer/speeddial/res/layout/fragment_speed_dial.xml
@@ -24,7 +24,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
- android:background="@color/background_dialer_light"
+ android:background="?android:attr/colorBackgroundFloating"
android:paddingBottom="@dimen/floating_action_button_list_bottom_padding"/>
<com.android.dialer.widget.EmptyContentView
diff --git a/java/com/android/dialer/speeddial/res/layout/speed_dial_header_layout.xml b/java/com/android/dialer/speeddial/res/layout/speed_dial_header_layout.xml
index 1605e8c..1a9d092 100644
--- a/java/com/android/dialer/speeddial/res/layout/speed_dial_header_layout.xml
+++ b/java/com/android/dialer/speeddial/res/layout/speed_dial_header_layout.xml
@@ -27,7 +27,7 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textSize="16sp"
- style="@style/SecondaryText"/>
+ style="@style/Dialer.TextAppearance.Secondary"/>
<Button
android:id="@+id/speed_dial_add_button"
@@ -40,6 +40,6 @@
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:text="@string/speed_dial_add_button_text"
- android:textColor="@color/dialer_theme_color"
+ android:textColor="?android:attr/colorPrimary"
style="@style/Widget.AppCompat.Button.Borderless"/>
</RelativeLayout>
\ No newline at end of file
diff --git a/java/com/android/dialer/speeddial/res/layout/suggestion_row_layout.xml b/java/com/android/dialer/speeddial/res/layout/suggestion_row_layout.xml
index f072c69..96532fb 100644
--- a/java/com/android/dialer/speeddial/res/layout/suggestion_row_layout.xml
+++ b/java/com/android/dialer/speeddial/res/layout/suggestion_row_layout.xml
@@ -41,13 +41,13 @@
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- style="@style/PrimaryText"/>
+ style="@style/Dialer.TextAppearance.Primary"/>
<TextView
android:id="@+id/number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- style="@style/SecondaryText"/>
+ style="@style/Dialer.TextAppearance.Secondary"/>
</LinearLayout>
<ImageView
@@ -59,6 +59,6 @@
android:scaleType="center"
android:tint="@color/secondary_text_color"
android:src="@drawable/quantum_ic_more_vert_white_24"
- android:background="?android:selectableItemBackgroundBorderless"
+ android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/content_description_overflow"/>
</RelativeLayout>
\ No newline at end of file
diff --git a/java/com/android/dialer/speeddial/res/values/styles.xml b/java/com/android/dialer/speeddial/res/values/styles.xml
index 46dbc35..38f31c3 100644
--- a/java/com/android/dialer/speeddial/res/values/styles.xml
+++ b/java/com/android/dialer/speeddial/res/values/styles.xml
@@ -19,7 +19,7 @@
<item name="android:drawableTint">@color/secondary_text_color</item>
</style>
- <style name="SpeedDialContextMenuItem.NoDrawableTint" parent="SecondaryText">
+ <style name="SpeedDialContextMenuItem.NoDrawableTint" parent="Dialer.TextAppearance.Secondary">
<item name="android:paddingStart">12dp</item>
<item name="android:minHeight">48dp</item>
<item name="android:gravity">center_vertical</item>
diff --git a/java/com/android/dialer/theme/ThemeUtil.java b/java/com/android/dialer/theme/ThemeUtil.java
new file mode 100644
index 0000000..2272244
--- /dev/null
+++ b/java/com/android/dialer/theme/ThemeUtil.java
@@ -0,0 +1,110 @@
+/*
+ * 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.
+ */
+
+package com.android.dialer.theme;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.support.annotation.ColorInt;
+import android.support.annotation.StyleRes;
+import android.view.ContextThemeWrapper;
+import android.view.LayoutInflater;
+import com.android.dialer.common.Assert;
+
+/** Utility for fetching */
+@SuppressWarnings("unused")
+public class ThemeUtil {
+
+ private static int theme = -1;
+ private static int colorIcon = -1;
+ private static int colorPrimary = -1;
+ private static int colorPrimaryDark = -1;
+ private static int colorAccent = -1;
+ private static int textColorPrimary = -1;
+ private static int textColorSecondary = -1;
+ private static int textColorPrimaryInverse = -1;
+ private static int textColorHint = -1;
+ private static int colorBackground = -1;
+ private static int colorBackgroundFloating = -1;
+
+ public static void initializeTheme(Context context) {
+ // TODO(a bug): add share prefs check to configure this
+ theme = R.style.Dialer_ThemeBase_NoActionBar;
+ context = context.getApplicationContext();
+ context.setTheme(theme);
+ TypedArray array =
+ context
+ .getTheme()
+ .obtainStyledAttributes(
+ theme,
+ new int[] {
+ android.R.attr.colorPrimary,
+ android.R.attr.colorPrimaryDark,
+ android.R.attr.colorAccent,
+ android.R.attr.textColorPrimary,
+ android.R.attr.textColorSecondary,
+ android.R.attr.textColorPrimaryInverse,
+ android.R.attr.textColorHint,
+ android.R.attr.colorBackground,
+ android.R.attr.colorBackgroundFloating,
+ R.attr.colorIcon,
+ });
+ colorPrimary = array.getColor(/* index= */ 0, /* defValue= */ -1);
+ colorPrimaryDark = array.getColor(/* index= */ 1, /* defValue= */ -1);
+ colorAccent = array.getColor(/* index= */ 2, /* defValue= */ -1);
+ textColorPrimary = array.getColor(/* index= */ 3, /* defValue= */ -1);
+ textColorSecondary = array.getColor(/* index= */ 4, /* defValue= */ -1);
+ textColorPrimaryInverse = array.getColor(/* index= */ 5, /* defValue= */ -1);
+ textColorHint = array.getColor(/* index= */ 6, /* defValue= */ -1);
+ colorBackground = array.getColor(/* index= */ 7, /* defValue= */ -1);
+ colorBackgroundFloating = array.getColor(/* index= */ 8, /* defValue= */ -1);
+ colorIcon = array.getColor(/* index= */ 9, /* defValue= */ -1);
+ array.recycle();
+ }
+
+ public static @ColorInt int getColorIcon() {
+ Assert.checkArgument(colorIcon != -1);
+ return colorIcon;
+ }
+
+ public static @ColorInt int getColorPrimary() {
+ Assert.checkArgument(colorPrimary != -1);
+ return colorPrimary;
+ }
+
+ public static @ColorInt int getColorAccent() {
+ Assert.checkArgument(colorAccent != -1);
+ return colorAccent;
+ }
+
+ public static @ColorInt int getTextColorSecondary() {
+ Assert.checkArgument(textColorSecondary != -1);
+ return textColorSecondary;
+ }
+
+ public static @StyleRes int getTheme() {
+ Assert.checkArgument(theme != -1);
+ return theme;
+ }
+
+ public static Context getThemedContext(Context context) {
+ return new ContextThemeWrapper(context, getTheme());
+ }
+
+ public static LayoutInflater getThemedLayoutInflator(LayoutInflater inflater) {
+ return inflater.cloneInContext(getThemedContext(inflater.getContext()));
+ }
+}
diff --git a/java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml b/java/com/android/dialer/theme/attributes/AndroidManifest.xml
similarity index 73%
copy from java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml
copy to java/com/android/dialer/theme/attributes/AndroidManifest.xml
index b858b4f..1a50716 100644
--- a/java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml
+++ b/java/com/android/dialer/theme/attributes/AndroidManifest.xml
@@ -1,4 +1,3 @@
-<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2018 The Android Open Source Project
~
@@ -14,7 +13,4 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
-<resources>
- <color name="bottom_nav_icon_selected">@color/dialer_theme_color</color>
- <color name="bottom_nav_icon_deselected">@color/dialer_secondary_text_color</color>
-</resources>
+<manifest package="com.android.dialer.theme.attributes"/>
diff --git a/java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml b/java/com/android/dialer/theme/attributes/res/values/attr.xml
similarity index 80%
rename from java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml
rename to java/com/android/dialer/theme/attributes/res/values/attr.xml
index b858b4f..6db0aa8 100644
--- a/java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml
+++ b/java/com/android/dialer/theme/attributes/res/values/attr.xml
@@ -15,6 +15,7 @@
~ limitations under the License
-->
<resources>
- <color name="bottom_nav_icon_selected">@color/dialer_theme_color</color>
- <color name="bottom_nav_icon_deselected">@color/dialer_secondary_text_color</color>
-</resources>
+
+ <!-- Used to style all icons in Dialer. -->
+ <attr name="colorIcon" format="reference"/>
+</resources>
\ No newline at end of file
diff --git a/java/com/android/dialer/theme/res/color/dialer_primary_text_color.xml b/java/com/android/dialer/theme/res/color/dialer_primary_text_color.xml
index 347db41..6612b17 100644
--- a/java/com/android/dialer/theme/res/color/dialer_primary_text_color.xml
+++ b/java/com/android/dialer/theme/res/color/dialer_primary_text_color.xml
@@ -16,6 +16,6 @@
-->
<!-- 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/dialer_disabled_text_color"/>
- <item android:color="#212121"/>
+ <item android:state_enabled="false" android:color="@color/dialer_text_color_disabled"/>
+ <item android:color="@color/dialer_primary_text_color_enabled"/>
</selector>
\ No newline at end of file
diff --git a/java/com/android/dialer/theme/res/color/dialer_secondary_text_color.xml b/java/com/android/dialer/theme/res/color/dialer_secondary_text_color.xml
index 920b467..e1c000a 100644
--- a/java/com/android/dialer/theme/res/color/dialer_secondary_text_color.xml
+++ b/java/com/android/dialer/theme/res/color/dialer_secondary_text_color.xml
@@ -16,6 +16,6 @@
-->
<!-- 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/dialer_disabled_text_color"/>
- <item android:color="#636363"/>
+ <item android:state_enabled="false" android:color="@color/dialer_text_color_disabled"/>
+ <item android:color="@color/dialer_secondary_text_color_enabled"/>
</selector>
\ No newline at end of file
diff --git a/java/com/android/dialer/app/res/color/settings_text_color_primary.xml b/java/com/android/dialer/theme/res/color/settings_text_color_primary.xml
similarity index 100%
rename from java/com/android/dialer/app/res/color/settings_text_color_primary.xml
rename to java/com/android/dialer/theme/res/color/settings_text_color_primary.xml
diff --git a/java/com/android/dialer/app/res/color/settings_text_color_secondary.xml b/java/com/android/dialer/theme/res/color/settings_text_color_secondary.xml
similarity index 100%
rename from java/com/android/dialer/app/res/color/settings_text_color_secondary.xml
rename to java/com/android/dialer/theme/res/color/settings_text_color_secondary.xml
diff --git a/java/com/android/dialer/theme/res/values/colors.xml b/java/com/android/dialer/theme/res/values/colors.xml
index 2185d86..7c62a21 100644
--- a/java/com/android/dialer/theme/res/values/colors.xml
+++ b/java/com/android/dialer/theme/res/values/colors.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2012 The Android Open Source Project
~
@@ -13,65 +14,18 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
-
+<!-- The colors in this file aren't configured at the theme level. -->
<resources>
- <!-- Note: The following colors are used in the Dialer settings screens. Since Dialer's settings
- link into the Telephony settings as well, changes to these colors should be mirrored in
- Telephony:
-
- Android source path: packages/apps/PhoneCommon/res/values/colors.xml
- - Local: dialer_theme_color Android Source: dialer_theme_color
- - Local: dialer_theme_color_dark Android Source: dialer_theme_color_dark
- Android source path: packages/services/Telecomm/res/values/colors.xml
- - Local: dialer_theme_color Android Source: theme_color
- - Local: dialer_theme_color_dark Android Source: dialer_settings_color_dark
- -->
- <color name="dialer_theme_color">#2A56C6</color>
- <color name="dialer_theme_color_dark">#1C3AA9</color>
-
- <color name="dialer_snackbar_action_text_color">#4285F4</color>
- <color name="dialer_theme_color_20pct">#332A56C6</color>
-
<color name="dialpad_fab_green">#00C853</color>
-
- <color name="dialer_secondary_color">#F50057</color>
-
- <color name="dialer_primary_text_color_white">#ffffff</color>
- <color name="dialer_edit_text_hint_color">#DE78909C</color>
-
- <!-- 38% opacity -->
- <color name="dialer_disabled_text_color">#9E9E9E</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 of the theme of the Dialer app -->
- <color name="dialtacts_theme_color">@color/dialer_theme_color</color>
-
- <!-- Background color of new dialer activity -->
- <color name="background_dialer_light">#fafafa</color>
- <!-- White background for dialer -->
- <color name="background_dialer_white">#ffffff</color>
- <color name="background_dialer_call_log_list_item">@color/background_dialer_white</color>
-
<!-- Colors for the notification actions -->
<color name="notification_action_accept">#097138</color>
<color name="notification_action_dismiss">#A52714</color>
<color name="notification_action_answer_video">#097138</color>
- <!-- Background color of action bars -->
- <color name="actionbar_background_color">@color/dialer_theme_color</color>
-
- <!-- Background color of title bars in recents -->
- <color name="titlebar_in_recents_background_color">@color/dialer_theme_color_dark</color>
-
+ <!-- Legacy -->
<color name="blue_grey_100">#CFD8DC</color>
-
- <!-- 54% opacity -->
- <color name="icon_color_grey">#89000000</color>
-
- <!-- Color for bubble -->
- <color name="dialer_end_call_button_color">#BD2A2A</color>
-
- <!-- Color for list dividers -->
- <color name="divider_line_color">#D8D8D8</color>
-</resources>
+</resources>
\ No newline at end of file
diff --git a/java/com/android/dialer/theme/res/values/colors_dialer_light.xml b/java/com/android/dialer/theme/res/values/colors_dialer_light.xml
new file mode 100644
index 0000000..ea82474
--- /dev/null
+++ b/java/com/android/dialer/theme/res/values/colors_dialer_light.xml
@@ -0,0 +1,55 @@
+<!--
+ ~ 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>
+ <!-- Note: The following colors are used in the Dialer settings screens. Since Dialer's settings
+ link into the Telephony settings as well, changes to these colors should be mirrored in
+ Telephony:
+
+ Android source path: packages/apps/PhoneCommon/res/values/colors.xml
+ - Local: dialer_theme_color Android Source: dialer_theme_color
+ - Local: dialer_theme_color_dark Android Source: dialer_theme_color_dark
+ Android source path: packages/services/Telecomm/res/values/colors.xml
+ - Local: dialer_theme_color Android Source: theme_color
+ - Local: dialer_theme_color_dark Android Source: dialer_settings_color_dark
+ -->
+ <!-- Essential theme colors -->
+ <color name="dialer_theme_color">#2A56C6</color>
+ <color name="dialer_theme_color_dark">#1C3AA9</color>
+ <color name="dialer_secondary_color">#F50057</color>
+ <color name="dialer_theme_color_20pct">#332A56C6</color>
+
+ <!-- Text colors -->
+ <color name="dialer_primary_text_color_enabled">#212121</color>
+ <color name="dialer_secondary_text_color_enabled">#636363</color>
+ <color name="dialer_text_color_disabled">#9E9E9E</color>
+ <color name="dialer_text_hint_color">#DE78909C</color>
+ <color name="dialer_primary_text_color_inverse">#FFFFFF</color>
+ <color name="dialer_secondary_text_color_inverse">#DDFFFFFF</color>
+ <color name="dialer_snackbar_action_text_color">#4285F4</color>
+
+ <!-- Colors for the setting text. -->
+ <!-- TODO(a bug): investigate if these should be removed. -->
+ <color name="setting_primary_color">@color/dialer_primary_text_color</color>
+ <color name="setting_secondary_color">@color/dialer_secondary_text_color</color>
+ <color name="setting_disabled_color">#AAAAAA</color>
+
+ <!-- Background colors -->
+ <color name="dialer_background_light">#FAFAFA</color>
+ <color name="dialer_background_floating_light">#FFFFFF</color>
+
+ <!-- Other useful colors -->
+ <color name="dialer_icon_color">#89000000</color>
+</resources>
diff --git a/java/com/android/dialer/theme/res/values/dimens.xml b/java/com/android/dialer/theme/res/values/dimens.xml
index 88b8a04..4abe4b5 100644
--- a/java/com/android/dialer/theme/res/values/dimens.xml
+++ b/java/com/android/dialer/theme/res/values/dimens.xml
@@ -54,4 +54,8 @@
<!-- Padding to be applied to the bottom of lists to make space for the floating action
button -->
<dimen name="floating_action_button_list_bottom_padding">88dp</dimen>
+
+ <!-- TODO(a bug): add a comment here -->
+ <dimen name="primary_text_size">16sp</dimen>
+ <dimen name="secondary_text_size">14sp</dimen>
</resources>
diff --git a/java/com/android/dialer/theme/res/values/styles.xml b/java/com/android/dialer/theme/res/values/styles.xml
deleted file mode 100644
index 8412aaa..0000000
--- a/java/com/android/dialer/theme/res/values/styles.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<!--
- ~ 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.
- ~ 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="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">2dp</item>
- <item name="cardBackgroundColor">@color/background_dialer_call_log_list_item</item>
- </style>
-
- <!-- Inherit from Theme.Material.Light.Dialog instead of Theme.Material.Light.Dialog.Alert
- since the Alert dialog is private. They are identical anyway. -->
- <style name="AlertDialogTheme" parent="@android:style/Theme.Material.Light.Dialog">
- <item name="android:colorAccent">@color/dialtacts_theme_color</item>
- </style>
-
- <style name="TextActionStyle">
- <item name="android:layout_width">wrap_content</item>
- <item name="android:layout_height">@dimen/call_log_action_height</item>
- <item name="android:gravity">end|center_vertical</item>
- <item name="android:paddingStart">@dimen/call_log_action_horizontal_padding</item>
- <item name="android:paddingEnd">@dimen/call_log_action_horizontal_padding</item>
- <item name="android:textColor">@color/dialtacts_theme_color</item>
- <item name="android:fontFamily">"sans-serif-medium"</item>
- <item name="android:focusable">true</item>
- <item name="android:singleLine">true</item>
- <item name="android:textAllCaps">true</item>
- </style>
-
- <style name="DialerButtonTextStyle" parent="@android:style/TextAppearance.Material.Widget.Button">
- <item name="android:textColor">@color/dialer_primary_text_color_white</item>
- </style>
-
- <style name="DialerActionBarBaseStyle"
- parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
- <item name="android:background">@color/actionbar_background_color</item>
- <item name="background">@color/actionbar_background_color</item>
- </style>
-
- <!-- This Checkbox style helps align checkboxes with the common list element layout(Image + text) -->
- <style name="DialerCheckboxStyle" parent="Widget.AppCompat.CompoundButton.CheckBox">
- <item name="android:layout_marginStart">20dp</item>
- <item name="android:paddingLeft">12dp</item>
- </style>
-</resources>
diff --git a/java/com/android/dialer/theme/res/values/styles_dialer_light.xml b/java/com/android/dialer/theme/res/values/styles_dialer_light.xml
new file mode 100644
index 0000000..6ce3b19
--- /dev/null
+++ b/java/com/android/dialer/theme/res/values/styles_dialer_light.xml
@@ -0,0 +1,110 @@
+<!--
+ ~ 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.
+ ~ 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="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">2dp</item>
+ <item name="cardBackgroundColor">?android:attr/colorBackgroundFloating</item>
+ </style>
+
+ <!-- TODO(a bug): properly document this or delete it -->
+ <style name="Theme.PreCall.DialogHolder" parent="Dialer.ThemeBase.NoActionBar">
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowActivityTransitions">false</item>
+ <item name="android:windowIsTranslucent">true</item>
+
+ <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:navigationBarColor">@android:color/transparent</item>
+ <item name="android:windowDrawsSystemBarBackgrounds">true</item>
+ </style>
+
+ <!-- Style applied to the "Settings" screen. Keep in sync with SettingsLight in Telephony. -->
+ <style name="SettingsStyle" parent="Dialer.ThemeBase">
+ <!-- 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:textColorLink">?android:attr/colorPrimary</item>
+ </style>
+
+ <style name="AlertDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert">
+ <!-- TODO(a bug): figure out why ?android:attr/colorPrimary doesn't work here -->
+ <item name="colorAccent">@color/dialer_theme_color</item>
+ </style>
+
+ <style name="TextActionStyle">
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">@dimen/call_log_action_height</item>
+ <item name="android:gravity">end|center_vertical</item>
+ <item name="android:paddingStart">@dimen/call_log_action_horizontal_padding</item>
+ <item name="android:paddingEnd">@dimen/call_log_action_horizontal_padding</item>
+ <item name="android:textColor">?android:attr/colorPrimary</item>
+ <item name="android:fontFamily">"sans-serif-medium"</item>
+ <item name="android:focusable">true</item>
+ <item name="android:singleLine">true</item>
+ <item name="android:textAllCaps">true</item>
+ </style>
+
+ <style name="DialerButtonTextStyle" parent="@android:style/TextAppearance.Material.Widget.Button">
+ <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
+ </style>
+
+ <style name="DialerActionBarBaseStyle"
+ parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
+ <item name="android:background">?android:attr/colorPrimary</item>
+ <item name="background">?android:attr/colorPrimary</item>
+ </style>
+
+ <!-- This Checkbox style helps align checkboxes with the common list element layout(Image + text) -->
+ <style name="DialerCheckboxStyle" parent="Widget.AppCompat.CompoundButton.CheckBox">
+ <item name="android:layout_marginStart">20dp</item>
+ <item name="android:paddingLeft">12dp</item>
+ </style>
+
+ <style name="Dialer.TextAppearance.Header" parent="TextAppearance.AppCompat">
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ <item name="android:textSize">20sp</item>
+ <item name="android:ellipsize">end</item>
+ <item name="android:maxLines">1</item>
+ </style>
+
+ <style name="Dialer.TextAppearance.Primary" parent="TextAppearance.AppCompat">
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ <item name="android:textSize">@dimen/primary_text_size</item>
+ <item name="android:ellipsize">end</item>
+ <item name="android:maxLines">1</item>
+ </style>
+
+ <style name="Dialer.TextAppearance.Secondary" parent="TextAppearance.AppCompat">
+ <item name="android:textColor">?android:attr/textColorSecondary</item>
+ <item name="android:textSize">@dimen/secondary_text_size</item>
+ <item name="android:ellipsize">end</item>
+ <item name="android:maxLines">1</item>
+ </style>
+
+ <style name="SubHeader" parent="TextAppearance.AppCompat">
+ <item name="android:textColor">#212121</item>
+ <item name="android:textSize">14sp</item>
+ <item name="android:lineSpacingMultiplier">1.1</item>
+ </style>
+</resources>
diff --git a/java/com/android/dialer/theme/res/values/theme_dialer_light.xml b/java/com/android/dialer/theme/res/values/theme_dialer_light.xml
new file mode 100644
index 0000000..7288429
--- /dev/null
+++ b/java/com/android/dialer/theme/res/values/theme_dialer_light.xml
@@ -0,0 +1,114 @@
+<?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"/>
+
+ <!-- Should be kept in sync with the theme below (minus anything related to actionbars) -->
+ <style name="Dialer.ThemeBase" parent="@style/Theme.AppCompat.Light.DarkActionBar">
+ <item name="android:textAppearanceButton">@style/DialerButtonTextStyle</item>
+
+ <!-- These values should be used to color all backgrounds. -->
+ <item name="android:colorBackground">@color/dialer_background_light</item>
+ <item name="android:colorBackgroundFloating">@color/dialer_background_floating_light</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/dialer_primary_text_color_inverse</item>
+ <item name="android:textColorSecondaryInverse">@color/dialer_secondary_text_color_inverse</item>
+ <item name="android:textColorHint">@color/dialer_text_hint_color</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>
+
+ <!-- Used to automatically style AlertDialogs -->
+ <item name="alertDialogTheme">@style/AlertDialogTheme</item>
+
+ <!-- Dialer specific attributes. -->
+ <item name="colorIcon">@color/dialer_secondary_text_color</item>
+
+ <!-- These are used to style the actionbar. -->
+ <item name="actionBarStyle">@style/DialerActionBarBaseStyle</item>
+ <item name="actionBarSize">@dimen/action_bar_height</item>
+
+ <!-- Theme for the dialpad. -->
+ <item name="dialpad_style">@style/Dialpad.Light</item>
+ </style>
+
+ <!-- Should be kept in sync with the theme above (minus anything related to actionbars) -->
+ <style name="Dialer.ThemeBase.NoActionBar" parent="@style/Theme.AppCompat.Light.NoActionBar">
+ <item name="android:textAppearanceButton">@style/DialerButtonTextStyle</item>
+
+ <!-- These values should be used to color all backgrounds. -->
+ <item name="android:colorBackground">@color/dialer_background_light</item>
+ <item name="android:colorBackgroundFloating">@color/dialer_background_floating_light</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/dialer_primary_text_color_inverse</item>
+ <item name="android:textColorSecondaryInverse">@color/dialer_secondary_text_color_inverse</item>
+ <item name="android:textColorHint">@color/dialer_text_hint_color</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_dark</item>
+ <item name="colorPrimaryDark">@color/dialer_theme_color_dark</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>
+
+ <!-- Used to automatically style AlertDialogs -->
+ <item name="alertDialogTheme">@style/AlertDialogTheme</item>
+
+ <!-- Dialer specific attributes. -->
+ <item name="colorIcon">@color/dialer_secondary_text_color</item>
+
+ <!-- Theme for the dialpad. -->
+ <item name="dialpad_style">@style/Dialpad.Light</item>
+ </style>
+
+ <!-- TODO(a bug): flesh this out some more. -->
+ <style name="Dialer.ThemeBase.NoActionBar.Dark" parent="Dialer.ThemeBase.NoActionBar">
+ <!-- swap text colors. -->
+ <item name="android:textColorPrimary">@color/dialer_primary_text_color_inverse</item>
+ <item name="android:textColorSecondary">@color/dialer_secondary_text_color_inverse</item>
+ <item name="android:textColorPrimaryInverse">@color/dialer_primary_text_color</item>
+ <item name="android:textColorSecondaryInverse">@color/dialer_secondary_text_color</item>
+ </style>
+
+ <!-- TODO(a bug): investigate making this style's parent Dialer.ThemeBase.NoActionBar -->
+ <style name="Theme.AppCompat.Translucent" parent="Theme.AppCompat.NoActionBar">
+ <item name="android:windowNoTitle">true</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowIsTranslucent">true</item>
+ <item name="android:windowAnimationStyle">@android:style/Animation</item>
+ </style>
+</resources>
diff --git a/java/com/android/dialer/theme/res/values/themes.xml b/java/com/android/dialer/theme/res/values/themes.xml
deleted file mode 100644
index 1c57066..0000000
--- a/java/com/android/dialer/theme/res/values/themes.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2017 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="DialerThemeBase" parent="@style/Theme.AppCompat.Light.DarkActionBar">
- <item name="android:textColorPrimary">@color/dialer_primary_text_color</item>
- <item name="android:textColorSecondary">@color/dialer_secondary_text_color</item>
- <!-- This is used for title bar color in recents -->
- <item name="android:colorPrimary">@color/titlebar_in_recents_background_color</item>
- <item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item>
- <item name="android:colorControlActivated">@color/dialer_theme_color</item>
- <item name="android:colorButtonNormal">@color/dialer_theme_color</item>
- <item name="android:colorAccent">@color/dialtacts_theme_color</item>
- <item name="android:alertDialogTheme">@style/AlertDialogTheme</item>
- <item name="android:textAppearanceButton">@style/DialerButtonTextStyle</item>
-
- <item name="android:actionBarStyle">@style/DialerActionBarBaseStyle</item>
- <item name="actionBarStyle">@style/DialerActionBarBaseStyle</item>
- <item name="android:actionBarSize">@dimen/action_bar_height</item>
- <item name="actionBarSize">@dimen/action_bar_height</item>
- </style>
-
- <!-- Should be kept in sync with the theme above (minus anything related to actionbars -->
- <style name="DialerThemeBase.NoActionBar" parent="@style/Theme.AppCompat.Light.NoActionBar">
- <item name="android:textColorPrimary">@color/dialer_primary_text_color</item>
- <item name="android:textColorSecondary">@color/dialer_secondary_text_color</item>
- <!-- This is used for title bar color in recents -->
- <item name="android:colorPrimary">@color/titlebar_in_recents_background_color</item>
- <item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item>
- <item name="android:colorControlActivated">@color/dialer_theme_color</item>
- <item name="android:colorButtonNormal">@color/dialer_theme_color</item>
- <item name="android:colorAccent">@color/dialtacts_theme_color</item>
- <item name="android:alertDialogTheme">@style/AlertDialogTheme</item>
- <item name="android:textAppearanceButton">@style/DialerButtonTextStyle</item>
- </style>
-
- <style name="Theme.AppCompat.Translucent" parent="Theme.AppCompat.NoActionBar">
- <item name="android:windowNoTitle">true</item>
- <item name="android:windowBackground">@android:color/transparent</item>
- <item name="android:colorBackgroundCacheHint">@null</item>
- <item name="android:windowIsTranslucent">true</item>
- <item name="android:windowAnimationStyle">@android:style/Animation</item>
- </style>
-
- <style name="PrimaryText" parent="TextAppearance.AppCompat">
- <item name="android:textColor">#DE000000</item>
- <item name="android:textSize">16sp</item>
- <item name="android:ellipsize">end</item>
- <item name="android:maxLines">1</item>
- </style>
-
- <style name="SecondaryText" parent="TextAppearance.AppCompat">
- <item name="android:textColor">#8A000000</item>
- <item name="android:textSize">14sp</item>
- <item name="android:ellipsize">end</item>
- <item name="android:maxLines">1</item>
- </style>
-
- <style name="SubHeader" parent="TextAppearance.AppCompat">
- <item name="android:textColor">#212121</item>
- <item name="android:textSize">14sp</item>
- <item name="android:lineSpacingMultiplier">1.1</item>
- </style>
-
-</resources>
diff --git a/java/com/android/dialer/voicemail/listui/error/res/values/styles.xml b/java/com/android/dialer/voicemail/listui/error/res/values/styles.xml
index bf70240..95866df 100644
--- a/java/com/android/dialer/voicemail/listui/error/res/values/styles.xml
+++ b/java/com/android/dialer/voicemail/listui/error/res/values/styles.xml
@@ -23,7 +23,7 @@
<item name="android:layout_marginStart">8dp</item>
<item name="android:layout_marginEnd">8dp</item>
<item name="android:padding">8dp</item>
- <item name="android:textColor">@color/dialer_theme_color</item>
+ <item name="android:textColor">?android:attr/colorPrimary</item>
<item name="android:fontFamily">"sans-serif-medium"</item>
<item name="android:focusable">true</item>
<item name="android:singleLine">true</item>
@@ -50,7 +50,7 @@
<style name="RaisedErrorActionStyle" parent="Widget.AppCompat.Button.Colored">
<item name="android:layout_width">wrap_content</item>
- <item name="android:colorButtonNormal">@color/dialer_theme_color</item>
+ <item name="android:colorButtonNormal">?android:attr/colorPrimary</item>
<item name="android:textSize">14sp</item>
<item name="android:layout_height">@dimen/call_log_action_height</item>
</style>
@@ -62,7 +62,7 @@
</style>
<style name="TosLinkStyle">
- <item name="android:textColor">@color/dialer_theme_color</item>
+ <item name="android:textColor">?android:attr/colorPrimary</item>
<item name="android:fontFamily">"sans-serif-medium"</item>
</style>
diff --git a/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_call_log_fragment.xml b/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_call_log_fragment.xml
index 1bd36fa..a001bd6 100644
--- a/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_call_log_fragment.xml
+++ b/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_call_log_fragment.xml
@@ -19,7 +19,7 @@
android:id="@+id/new_voicemail_frame_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/background_dialer_white"
+ android:background="?android:attr/colorBackground"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
diff --git a/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry.xml b/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry.xml
index 9a9e9ee..b5e095b 100644
--- a/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry.xml
+++ b/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry.xml
@@ -39,7 +39,7 @@
<TextView
android:id="@+id/primary_text"
- style="@style/PrimaryText"
+ style="@style/Dialer.TextAppearance.Primary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
@@ -60,12 +60,13 @@
android:layout_gravity="center_vertical"
android:importantForAccessibility="no"
android:src="@drawable/quantum_ic_voicemail_vd_theme_24"
- android:tint="@color/dialtacts_theme_color"
- android:tintMode="multiply"/>
+ android:tint="?android:attr/colorPrimary"
+ android:tintMode="multiply"
+ tools:ignore="ContentDescription"/>
<TextView
android:id="@+id/secondary_text"
- style="@style/SecondaryText"
+ style="@style/Dialer.TextAppearance.Secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
@@ -76,7 +77,7 @@
<!-- TODO(a bug): Make text selectable -->
<TextView
android:id="@+id/transcription_text"
- style="@style/PrimaryText"
+ style="@style/Dialer.TextAppearance.Primary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
@@ -86,7 +87,7 @@
<TextView
android:id="@+id/transcription_branding"
- style="@style/SecondaryText"
+ style="@style/Dialer.TextAppearance.Secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
diff --git a/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry_alert.xml b/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry_alert.xml
index fba39f1..109cecc 100644
--- a/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry_alert.xml
+++ b/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry_alert.xml
@@ -87,14 +87,14 @@
style="@style/TosButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="@color/dialer_theme_color"/>
+ android:textColor="?android:attr/colorPrimary"/>
<Button
android:id="@+id/voicemail_alert_primary_button"
style="@style/TosButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="@color/dialer_theme_color"/>
+ android:textColor="?android:attr/colorPrimary"/>
</LinearLayout>
<View
diff --git a/java/com/android/dialer/widget/res/color/dialer_tint_state.xml b/java/com/android/dialer/widget/res/color/dialer_tint_state.xml
index c29f334..84b2bc0 100644
--- a/java/com/android/dialer/widget/res/color/dialer_tint_state.xml
+++ b/java/com/android/dialer/widget/res/color/dialer_tint_state.xml
@@ -18,6 +18,6 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:color="@color/dialer_edit_text_hint_color" android:state_enabled="false"/>
- <item android:color="@color/dialer_theme_color"/>
+ <item android:color="?android:attr/textColorHint" android:state_enabled="false"/>
+ <item android:color="?android:attr/colorPrimary"/>
</selector>
\ No newline at end of file
diff --git a/java/com/android/dialer/widget/res/drawable/contact_photo_badge_background.xml b/java/com/android/dialer/widget/res/drawable/contact_photo_badge_background.xml
index 4dcc705..76af600 100644
--- a/java/com/android/dialer/widget/res/drawable/contact_photo_badge_background.xml
+++ b/java/com/android/dialer/widget/res/drawable/contact_photo_badge_background.xml
@@ -18,6 +18,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
- <solid android:color="@color/dialer_theme_color"/>
- <stroke android:color="@color/background_dialer_white" android:width="2dp"/>
+ <solid android:color="?android:attr/colorPrimary"/>
+ <stroke android:color="?android:attr/colorBackground" android:width="2dp"/>
</shape>
\ No newline at end of file
diff --git a/java/com/android/dialer/widget/res/drawable/edittext_custom_cursor.xml b/java/com/android/dialer/widget/res/drawable/edittext_custom_cursor.xml
index 2f01628..62cd9ab 100644
--- a/java/com/android/dialer/widget/res/drawable/edittext_custom_cursor.xml
+++ b/java/com/android/dialer/widget/res/drawable/edittext_custom_cursor.xml
@@ -17,5 +17,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<size android:width="2dp"/>
- <solid android:color="@color/dialtacts_theme_color"/>
+ <solid android:color="?android:attr/colorPrimary"/>
</shape>
\ No newline at end of file
diff --git a/java/com/android/dialer/widget/res/layout/dialer_toolbar.xml b/java/com/android/dialer/widget/res/layout/dialer_toolbar.xml
index 023b0ff..0540a00 100644
--- a/java/com/android/dialer/widget/res/layout/dialer_toolbar.xml
+++ b/java/com/android/dialer/widget/res/layout/dialer_toolbar.xml
@@ -28,7 +28,7 @@
android:layout_height="wrap_content"
android:gravity="top"
android:textSize="@dimen/toolbar_title_text_size"
- android:textColor="@color/background_dialer_white"
+ android:textColor="?android:attr/colorBackground"
android:fontFamily="sans-serif-medium"
android:maxLines="1"
android:ellipsize="end"/>
@@ -38,7 +38,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/toolbar_subtitle_text_size"
- android:textColor="@color/background_dialer_white"
+ android:textColor="?android:attr/colorBackground"
android:visibility="gone"
android:maxLines="1"
android:ellipsize="end"/>
diff --git a/java/com/android/dialer/widget/res/layout/fragment_message.xml b/java/com/android/dialer/widget/res/layout/fragment_message.xml
index ac62dd9..388a8d5 100644
--- a/java/com/android/dialer/widget/res/layout/fragment_message.xml
+++ b/java/com/android/dialer/widget/res/layout/fragment_message.xml
@@ -18,7 +18,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/background_dialer_white">
+ android:background="?android:attr/colorBackground">
<ScrollView
android:layout_width="match_parent"
@@ -53,8 +53,8 @@
android:textSize="@dimen/message_item_text_size"
android:hint="@string/custom_message_hint"
android:textColor="@color/dialer_primary_text_color"
- android:textColorHint="@color/dialer_edit_text_hint_color"
- android:background="@color/background_dialer_white"
+ android:textColorHint="?android:attr/textColorHint"
+ android:background="?android:attr/colorBackground"
android:textCursorDrawable="@drawable/edittext_custom_cursor"
android:layout_toStartOf="@+id/count_and_send_container"
android:inputType="textShortMessage|textCapSentences"
@@ -85,7 +85,7 @@
android:layout_height="wrap_content"
android:visibility="gone"
android:textSize="@dimen/message_remaining_char_text_size"
- android:textColor="@color/dialer_edit_text_hint_color"/>
+ android:textColor="?android:attr/textColorHint"/>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
diff --git a/java/com/android/incallui/ConferenceParticipantListAdapter.java b/java/com/android/incallui/ConferenceParticipantListAdapter.java
index 597702b..5318fdb 100644
--- a/java/com/android/incallui/ConferenceParticipantListAdapter.java
+++ b/java/com/android/incallui/ConferenceParticipantListAdapter.java
@@ -357,9 +357,8 @@
statusTextView.setText(onHoldText);
statusTextView.setVisibility(View.VISIBLE);
- int onHoldColor = getContext().getColor(R.color.dialer_disabled_text_color);
- nameTextView.setTextColor(onHoldColor);
- numberTextView.setTextColor(onHoldColor);
+ nameTextView.setEnabled(false);
+ numberTextView.setEnabled(false);
TypedValue alpha = new TypedValue();
getContext().getResources().getValue(R.dimen.alpha_hiden, alpha, true);
@@ -373,10 +372,8 @@
TextView numberTextView) {
statusTextView.setVisibility(View.GONE);
- nameTextView.setTextColor(
- getContext().getColor(R.color.conference_call_manager_caller_name_text_color));
- numberTextView.setTextColor(
- getContext().getColor(R.color.conference_call_manager_secondary_text_color));
+ nameTextView.setEnabled(true);
+ numberTextView.setEnabled(true);
TypedValue alpha = new TypedValue();
getContext().getResources().getValue(R.dimen.alpha_enabled, alpha, true);
diff --git a/java/com/android/incallui/PostCharDialogFragment.java b/java/com/android/incallui/PostCharDialogFragment.java
index 1d06fd4..4bcc68e 100644
--- a/java/com/android/incallui/PostCharDialogFragment.java
+++ b/java/com/android/incallui/PostCharDialogFragment.java
@@ -55,8 +55,7 @@
buf.append(getResources().getText(R.string.wait_prompt_str));
buf.append(postDialStr);
- final AlertDialog.Builder builder =
- new AlertDialog.Builder(getActivity(), R.style.AlertDialogTheme);
+ final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setMessage(buf.toString());
builder.setPositiveButton(
diff --git a/java/com/android/incallui/RttRequestDialogFragment.java b/java/com/android/incallui/RttRequestDialogFragment.java
index fa9b0e5..5437cc6 100644
--- a/java/com/android/incallui/RttRequestDialogFragment.java
+++ b/java/com/android/incallui/RttRequestDialogFragment.java
@@ -83,7 +83,7 @@
.setOnClickListener(v -> onPositiveButtonClick());
AlertDialog alertDialog =
- new AlertDialog.Builder(getActivity(), R.style.AlertDialogTheme)
+ new AlertDialog.Builder(getActivity())
.setCancelable(false)
.setView(dialogView)
.setTitle(R.string.rtt_request_dialog_title)
diff --git a/java/com/android/incallui/answer/impl/res/layout/fragment_incoming_call.xml b/java/com/android/incallui/answer/impl/res/layout/fragment_incoming_call.xml
index 1c8cbfd..589a743 100644
--- a/java/com/android/incallui/answer/impl/res/layout/fragment_incoming_call.xml
+++ b/java/com/android/incallui/answer/impl/res/layout/fragment_incoming_call.xml
@@ -124,7 +124,7 @@
android:textAllCaps="true"
android:textSize="14sp"
android:textStyle="bold"
- android:textColor="@color/background_dialer_white"
+ android:textColor="?android:attr/colorBackground"
android:background="@drawable/urgent_call_background"/>
<FrameLayout
diff --git a/java/com/android/incallui/audioroute/res/values/styles.xml b/java/com/android/incallui/audioroute/res/values/styles.xml
index 4484b70..6bf9b47 100644
--- a/java/com/android/incallui/audioroute/res/values/styles.xml
+++ b/java/com/android/incallui/audioroute/res/values/styles.xml
@@ -1,14 +1,29 @@
<?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="AudioRouteItem">
<item name="android:padding">16dp</item>
- <item name="android:background">?android:selectableItemBackground</item>
+ <item name="android:background">?android:attr/selectableItemBackground</item>
<item name="android:drawablePadding">24dp</item>
<item name="android:gravity">center_vertical</item>
<item name="android:textAppearance">
@style/TextAppearance.AppCompat.Light.Widget.PopupMenu.Large
</item>
- <item name="android:textColor">?android:textColorSecondary</item>
+ <item name="android:textColor">?android:attr/textColorSecondary</item>
</style>
</resources>
diff --git a/java/com/android/incallui/calllocation/impl/res/layout/location_fragment.xml b/java/com/android/incallui/calllocation/impl/res/layout/location_fragment.xml
index d20e32b..5d1e2ba 100644
--- a/java/com/android/incallui/calllocation/impl/res/layout/location_fragment.xml
+++ b/java/com/android/incallui/calllocation/impl/res/layout/location_fragment.xml
@@ -85,7 +85,7 @@
android:contentDescription="@string/location_map_description"
android:scaleType="centerCrop"
android:visibility="invisible"
- tools:src="?android:colorPrimaryDark"
+ tools:src="?android:attr/colorPrimaryDark"
tools:visibility="visible"/>
<TextView
diff --git a/java/com/android/incallui/callpending/AndroidManifest.xml b/java/com/android/incallui/callpending/AndroidManifest.xml
index 231553e..aa316a3 100644
--- a/java/com/android/incallui/callpending/AndroidManifest.xml
+++ b/java/com/android/incallui/callpending/AndroidManifest.xml
@@ -16,8 +16,8 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.incallui.callpending">
- <application android:theme="@style/Theme.AppCompat">
- <!-- Identical to .InCallActivity except orientation is locked to portrait -->
+ <application>
+ <!-- Identical to .InCallActivity except orientation is locked to portrait -->
<activity
android:directBootAware="true"
android:excludeFromRecents="true"
diff --git a/java/com/android/incallui/commontheme/res/values/styles.xml b/java/com/android/incallui/commontheme/res/values/styles.xml
index a979cc3..464eda5 100644
--- a/java/com/android/incallui/commontheme/res/values/styles.xml
+++ b/java/com/android/incallui/commontheme/res/values/styles.xml
@@ -18,18 +18,18 @@
<resources>
<style name="Dialer.Incall.TextAppearance" parent="android:TextAppearance.Material">
- <item name="android:textColor">?android:textColorSecondary</item>
+ <item name="android:textColor">?android:attr/textColorSecondary</item>
<item name="android:textSize">18sp</item>
</style>
<style name="Dialer.Incall.TextAppearance.Large">
- <item name="android:textColor">?android:textColorPrimary</item>
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">36sp</item>
<item name="android:fontFamily">sans-serif-light</item>
</style>
<style name="Dialer.Incall.TextAppearance.Label">
- <item name="android:textColor">?android:textColorPrimary</item>
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">12sp</item>
</style>
@@ -38,7 +38,7 @@
<item name="android:layout_width">24dp</item>
<item name="android:layout_marginEnd">8dp</item>
<item name="android:scaleType">fitCenter</item>
- <item name="colorControlNormal">?android:textColorSecondary</item>
+ <item name="colorControlNormal">?android:attr/textColorSecondary</item>
</style>
<style name="Incall.Button.End" parent="android:Widget.Material.Button">
diff --git a/java/com/android/incallui/incall/impl/res/values/dimens.xml b/java/com/android/incallui/incall/impl/res/values/dimens.xml
index 439dc1d..c4a7be6 100644
--- a/java/com/android/incallui/incall/impl/res/values/dimens.xml
+++ b/java/com/android/incallui/incall/impl/res/values/dimens.xml
@@ -18,7 +18,6 @@
<resources>
<dimen name="incall_button_label_margin">8dp</dimen>
<dimen name="incall_button_elevation">0dp</dimen>
- <dimen name="incall_end_call_spacing">116dp</dimen>
<dimen name="incall_button_padding">4dp</dimen>
<dimen name="incall_button_vertical_padding">8dp</dimen>
<dimen name="incall_avatar_size">0dp</dimen>
diff --git a/java/com/android/incallui/res/drawable/incall_background_gradient.xml b/java/com/android/incallui/res/drawable/incall_background_gradient.xml
deleted file mode 100644
index 5dd927f..0000000
--- a/java/com/android/incallui/res/drawable/incall_background_gradient.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
- <gradient
- android:angle="270"
- android:startColor="@color/incall_background_gradient_top"
- android:centerColor="@color/incall_background_gradient_middle"
- android:endColor="@color/incall_background_gradient_bottom"/>
-</shape>
diff --git a/java/com/android/incallui/res/layout/caller_in_conference.xml b/java/com/android/incallui/res/layout/caller_in_conference.xml
index 23bb285..3f660c5 100644
--- a/java/com/android/incallui/res/layout/caller_in_conference.xml
+++ b/java/com/android/incallui/res/layout/caller_in_conference.xml
@@ -67,8 +67,8 @@
android:id="@+id/conferenceCallerStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- style="@style/SecondaryText"
- android:textColor="@color/dialer_disabled_text_color"
+ style="@style/Dialer.TextAppearance.Secondary"
+ android:enabled="false"
android:visibility="gone"/>
<!-- Number -->
@@ -93,12 +93,12 @@
android:id="@+id/conferenceCallerSeparate"
android:layout_width="@dimen/conference_call_manager_button_dimension"
android:layout_height="@dimen/conference_call_manager_button_dimension"
- android:background="?android:selectableItemBackgroundBorderless"
+ android:background="?android:attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="@string/goPrivate"
android:scaleType="center"
android:src="@drawable/ic_call_split_white_24dp"
- android:tint="@color/icon_color_grey"/>
+ android:tint="?colorIcon"/>
<!-- "Disconnect" button which terminates the connection with this caller. -->
<ImageButton
@@ -106,11 +106,11 @@
android:layout_width="@dimen/conference_call_manager_button_dimension"
android:layout_height="@dimen/conference_call_manager_button_dimension"
android:layout_marginStart="8dp"
- android:background="?android:selectableItemBackgroundBorderless"
+ android:background="?android:attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="@string/conference_caller_disconnect_content_description"
android:scaleType="center"
android:src="@drawable/quantum_ic_call_end_white_24"
- android:tint="@color/icon_color_grey"/>
+ android:tint="?colorIcon"/>
</LinearLayout> <!-- End of single list element -->
diff --git a/java/com/android/incallui/res/layout/frag_rtt_request_dialog.xml b/java/com/android/incallui/res/layout/frag_rtt_request_dialog.xml
index ab743eb..2e40cab 100644
--- a/java/com/android/incallui/res/layout/frag_rtt_request_dialog.xml
+++ b/java/com/android/incallui/res/layout/frag_rtt_request_dialog.xml
@@ -70,7 +70,7 @@
android:layout_gravity="end"
android:paddingStart="16dp"
android:paddingEnd="16dp"
- android:backgroundTint="@color/dialer_theme_color"
+ android:backgroundTint="?android:attr/colorPrimary"
android:fontFamily="sans-serif-medium"
android:stateListAnimator="@null"
android:text="@string/rtt_button_accept_request"
diff --git a/java/com/android/incallui/res/values/strings.xml b/java/com/android/incallui/res/values/strings.xml
index c7e5677..c18ee49 100644
--- a/java/com/android/incallui/res/values/strings.xml
+++ b/java/com/android/incallui/res/values/strings.xml
@@ -16,11 +16,6 @@
-->
<resources xmlns:tools="http://schemas.android.com/tools" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- Official label of the phone app, as seen in "Manage Applications"
- and other settings UIs. -->
- <string name="phoneAppLabel" product="default">Phone</string>
-
<!-- MMI dialog strings -->
<!-- Dialog label when an MMI code starts running -->
diff --git a/java/com/android/incallui/sessiondata/res/drawable/answer_data_background.xml b/java/com/android/incallui/sessiondata/res/drawable/answer_data_background.xml
index 1d481f3..cb76633 100644
--- a/java/com/android/incallui/sessiondata/res/drawable/answer_data_background.xml
+++ b/java/com/android/incallui/sessiondata/res/drawable/answer_data_background.xml
@@ -19,5 +19,5 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="16dp"/>
- <solid android:color="@color/background_dialer_white"/>
+ <solid android:color="?android:attr/colorBackground"/>
</shape>
diff --git a/java/com/android/incallui/sessiondata/res/drawable/spam_container_background.xml b/java/com/android/incallui/sessiondata/res/drawable/spam_container_background.xml
index f01fe51..023012b 100644
--- a/java/com/android/incallui/sessiondata/res/drawable/spam_container_background.xml
+++ b/java/com/android/incallui/sessiondata/res/drawable/spam_container_background.xml
@@ -18,5 +18,5 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="16dp"/>
- <solid android:color="@color/background_dialer_light"/>
+ <solid android:color="?android:attr/colorBackgroundFloating"/>
</shape>
\ No newline at end of file
diff --git a/java/com/android/incallui/sessiondata/res/layout/fragment_composer_text.xml b/java/com/android/incallui/sessiondata/res/layout/fragment_composer_text.xml
index b93db63..b7b3580 100644
--- a/java/com/android/incallui/sessiondata/res/layout/fragment_composer_text.xml
+++ b/java/com/android/incallui/sessiondata/res/layout/fragment_composer_text.xml
@@ -39,7 +39,7 @@
android:paddingEnd="32dp"
android:minHeight="108dp"
android:lineSpacingMultiplier="1.2"
- android:textColor="@color/background_dialer_white"
+ android:textColor="?android:attr/colorBackground"
android:textAppearance="@style/Dialer.Incall.TextAppearance.Message"
android:background="@drawable/answer_text_only_background"
app:autoSizeTextType="uniform"
diff --git a/java/com/android/incallui/spam/SpamNotificationActivity.java b/java/com/android/incallui/spam/SpamNotificationActivity.java
index 2cf4868..37755fc 100644
--- a/java/com/android/incallui/spam/SpamNotificationActivity.java
+++ b/java/com/android/incallui/spam/SpamNotificationActivity.java
@@ -16,7 +16,6 @@
package com.android.incallui.spam;
-import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.Context;
@@ -27,6 +26,7 @@
import android.provider.ContactsContract;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentActivity;
+import android.support.v7.app.AlertDialog;
import android.telephony.PhoneNumberUtils;
import com.android.dialer.blocking.BlockedNumbersMigrator;
import com.android.dialer.blocking.FilteredNumberAsyncQueryHandler;
@@ -230,7 +230,7 @@
}
},
dismissListener)
- .show(getFragmentManager(), BlockReportSpamDialogs.NOT_SPAM_DIALOG_TAG);
+ .show(getSupportFragmentManager(), BlockReportSpamDialogs.NOT_SPAM_DIALOG_TAG);
} else {
reportNotSpamAndFinish(number, contactLookupResultType);
}
@@ -257,7 +257,9 @@
}
},
dismissListener)
- .show(getFragmentManager(), BlockReportSpamDialogs.BLOCK_REPORT_SPAM_DIALOG_TAG);
+ .show(
+ getSupportFragmentManager(),
+ BlockReportSpamDialogs.BLOCK_REPORT_SPAM_DIALOG_TAG);
}
});
} else {
@@ -539,7 +541,7 @@
private void showSpamBlockingPromoDialog() {
spamBlockingPromoHelper.showSpamBlockingPromoDialog(
- getFragmentManager(),
+ getSupportFragmentManager(),
() -> {
Logger.get(this)
.logImpression(
diff --git a/java/com/android/incallui/telecomeventui/InternationalCallOnWifiDialogFragment.java b/java/com/android/incallui/telecomeventui/InternationalCallOnWifiDialogFragment.java
index 71a8be4..cd53f26 100644
--- a/java/com/android/incallui/telecomeventui/InternationalCallOnWifiDialogFragment.java
+++ b/java/com/android/incallui/telecomeventui/InternationalCallOnWifiDialogFragment.java
@@ -109,7 +109,7 @@
alwaysWarn.setChecked(preferences.getBoolean(ALWAYS_SHOW_WARNING_PREFERENCE_KEY, false));
AlertDialog alertDialog =
- new AlertDialog.Builder(getActivity(), R.style.AlertDialogTheme)
+ new AlertDialog.Builder(getActivity())
.setCancelable(false)
.setView(dialogView)
.setPositiveButton(
diff --git a/java/com/android/incallui/telecomeventui/res/layout/frag_international_call_on_wifi_dialog.xml b/java/com/android/incallui/telecomeventui/res/layout/frag_international_call_on_wifi_dialog.xml
index 3d8adcb..996bc75 100644
--- a/java/com/android/incallui/telecomeventui/res/layout/frag_international_call_on_wifi_dialog.xml
+++ b/java/com/android/incallui/telecomeventui/res/layout/frag_international_call_on_wifi_dialog.xml
@@ -35,7 +35,7 @@
android:id="@+id/always_warn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:buttonTint="@color/dialer_theme_color"
+ android:buttonTint="?android:attr/colorPrimary"
android:text="@string/always_warn"
android:textColor="@color/dialer_primary_text_color"
android:textSize="14sp"/>
diff --git a/java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml b/java/com/android/incallui/theme/AndroidManifest.xml
similarity index 73%
copy from java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml
copy to java/com/android/incallui/theme/AndroidManifest.xml
index b858b4f..3b1a459 100644
--- a/java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml
+++ b/java/com/android/incallui/theme/AndroidManifest.xml
@@ -1,4 +1,3 @@
-<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2018 The Android Open Source Project
~
@@ -14,7 +13,4 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
-<resources>
- <color name="bottom_nav_icon_selected">@color/dialer_theme_color</color>
- <color name="bottom_nav_icon_deselected">@color/dialer_secondary_text_color</color>
-</resources>
+<manifest package="com.android.incallui.theme"/>
diff --git a/java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml b/java/com/android/incallui/theme/res/drawable/incall_background_gradient.xml
similarity index 68%
copy from java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml
copy to java/com/android/incallui/theme/res/drawable/incall_background_gradient.xml
index b858b4f..996f172 100644
--- a/java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml
+++ b/java/com/android/incallui/theme/res/drawable/incall_background_gradient.xml
@@ -14,7 +14,10 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
-<resources>
- <color name="bottom_nav_icon_selected">@color/dialer_theme_color</color>
- <color name="bottom_nav_icon_deselected">@color/dialer_secondary_text_color</color>
-</resources>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+ <gradient
+ android:angle="270"
+ android:startColor="@color/incall_background_gradient_top"
+ android:centerColor="@color/incall_background_gradient_middle"
+ android:endColor="@color/incall_background_gradient_bottom"/>
+</shape>
diff --git a/java/com/android/incallui/res/values/colors.xml b/java/com/android/incallui/theme/res/values/colors.xml
similarity index 96%
rename from java/com/android/incallui/res/values/colors.xml
rename to java/com/android/incallui/theme/res/values/colors.xml
index 32da57b..cb894bb 100644
--- a/java/com/android/incallui/res/values/colors.xml
+++ b/java/com/android/incallui/theme/res/values/colors.xml
@@ -23,7 +23,7 @@
<color name="incall_dialpad_background">#ffffff</color>
<!-- Background color for status bar. For portrait this will be ignored. -->
- <color name="statusbar_background_color">@color/dialer_theme_color</color>
+ <color name="statusbar_background_color">?android:attr/colorPrimary</color>
<!-- 20% opacity, theme color. -->
<color name="incall_dialpad_touch_tint">@color/dialer_theme_color_20pct</color>
diff --git a/java/com/android/incallui/res/values/dimens.xml b/java/com/android/incallui/theme/res/values/dimens.xml
similarity index 97%
rename from java/com/android/incallui/res/values/dimens.xml
rename to java/com/android/incallui/theme/res/values/dimens.xml
index 5688169..a84d819 100644
--- a/java/com/android/incallui/res/values/dimens.xml
+++ b/java/com/android/incallui/theme/res/values/dimens.xml
@@ -27,6 +27,7 @@
@dimen/dialpad_key_letters_default_size_for_single_alphabet
</dimen>
<dimen name="incall_dialpad_key_numbers_size">36dp</dimen>
+ <dimen name="incall_end_call_spacing">116dp</dimen>
<!-- Dimension used to possibly down-scale high-res photo into what is suitable
for notification's large icon. -->
diff --git a/java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml b/java/com/android/incallui/theme/res/values/strings.xml
similarity index 79%
copy from java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml
copy to java/com/android/incallui/theme/res/values/strings.xml
index b858b4f..c612905 100644
--- a/java/com/android/dialer/main/impl/bottomnav/res/values/colors.xml
+++ b/java/com/android/incallui/theme/res/values/strings.xml
@@ -15,6 +15,7 @@
~ limitations under the License
-->
<resources>
- <color name="bottom_nav_icon_selected">@color/dialer_theme_color</color>
- <color name="bottom_nav_icon_deselected">@color/dialer_secondary_text_color</color>
-</resources>
+ <!-- Official label of the phone app, as seen in "Manage Applications"
+ and other settings UIs. -->
+ <string name="phoneAppLabel" product="default">Phone</string>
+</resources>
\ No newline at end of file
diff --git a/java/com/android/incallui/res/values/styles.xml b/java/com/android/incallui/theme/res/values/styles.xml
similarity index 82%
rename from java/com/android/incallui/res/values/styles.xml
rename to java/com/android/incallui/theme/res/values/styles.xml
index 269b721..6bbad4e 100644
--- a/java/com/android/incallui/res/values/styles.xml
+++ b/java/com/android/incallui/theme/res/values/styles.xml
@@ -20,12 +20,7 @@
circular reveal animation for a new outgoing call to work correctly. We don't just use
Theme.Black.NoTitleBar directly, since we want any popups or dialogs from the
InCallActivity to have the correct Material style. -->
- <style name="Theme.InCallScreen" parent="@style/Theme.AppCompat.NoActionBar">
- <item name="android:textColorPrimary">#ffffff</item>
- <item name="android:textColorSecondary">#DDFFFFFF</item>
- <item name="android:colorPrimary">@color/dialer_theme_color</item>
- <item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item>
-
+ <style name="Theme.InCallScreen" parent="@style/Dialer.ThemeBase.NoActionBar.Dark">
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
@@ -33,13 +28,12 @@
<item name="dialpad_key_button_touch_tint">@color/incall_dialpad_touch_tint</item>
<item name="dialpad_style">@style/InCallDialpad</item>
<item name="android:windowAnimationStyle">@null</item>
- <item name="android:alertDialogTheme">@style/AlertDialogTheme</item>
<item name="android:windowBackground">@drawable/incall_background_gradient</item>
<item name="android:windowShowWallpaper">true</item>
</style>
- <style name="Theme.InCallScreen.ManageConference" parent="DialerThemeBase">
+ <style name="Theme.InCallScreen.ManageConference" parent="Dialer.ThemeBase">
</style>
<style name="InCallDialpad" parent="Dialpad.Light">
@@ -65,18 +59,17 @@
@dimen/incall_end_call_spacing
</item>
<item name="dialpad_elevation">10dp</item>
+ <item name="dialpad_text_color_secondary">?android:attr/textColorSecondaryInverse</item>
</style>
<style name="AfterCallNotificationTheme" parent="@android:style/Theme.Material.Light.Dialog">
<!-- This colorAccent is to style checkboxes in the dialogs -->
- <item name="colorAccent">@color/dialer_theme_color</item>
- <!-- This is needed to make any alert dialogs in this activity take up minimum space -->
- <item name="android:alertDialogTheme">@style/AfterCallDialogStyle</item>
+ <item name="colorAccent">?android:attr/colorPrimary</item>
</style>
<style name="AfterCallDialogStyle" parent="@android:style/Theme.Material.Light.Dialog">
<!-- This colorAccent is to style text in the dialogs -->
- <item name="android:colorAccent">@color/dialer_theme_color</item>
+ <item name="android:colorAccent">?android:attr/colorPrimary</item>
</style>
<style name="Theme.Incall.DialogHolder" parent="Theme.AppCompat.Translucent">
diff --git a/java/com/android/incallui/video/impl/VideoChargesAlertDialogFragment.java b/java/com/android/incallui/video/impl/VideoChargesAlertDialogFragment.java
index 6762a9d..7993452 100644
--- a/java/com/android/incallui/video/impl/VideoChargesAlertDialogFragment.java
+++ b/java/com/android/incallui/video/impl/VideoChargesAlertDialogFragment.java
@@ -117,7 +117,7 @@
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getActivity());
AlertDialog alertDialog =
- new AlertDialog.Builder(getActivity(), R.style.AlertDialogTheme)
+ new AlertDialog.Builder(getActivity())
.setView(dialogView)
.setPositiveButton(
android.R.string.ok,
diff --git a/java/com/android/incallui/video/impl/res/layout/frag_video_charges_alert_dialog.xml b/java/com/android/incallui/video/impl/res/layout/frag_video_charges_alert_dialog.xml
index a547c7d..56e1d79 100644
--- a/java/com/android/incallui/video/impl/res/layout/frag_video_charges_alert_dialog.xml
+++ b/java/com/android/incallui/video/impl/res/layout/frag_video_charges_alert_dialog.xml
@@ -41,7 +41,7 @@
android:id="@+id/do_not_show"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:buttonTint="@color/dialer_theme_color"
+ android:buttonTint="?android:attr/colorPrimary"
android:focusable="true"
android:clickable="true"
android:text="@string/do_not_show_again"