summaryrefslogtreecommitdiff
path: root/java/com/android/dialer
diff options
context:
space:
mode:
authorcalderwoodra <calderwoodra@google.com>2018-05-22 15:30:39 -0700
committerCopybara-Service <copybara-piper@google.com>2018-05-29 23:24:53 -0700
commitc5c42189eeab0389a94717de9a66c6d00068e8bf (patch)
treefbecd02f5176af6c8c2ac6bd620e117d341e62bf /java/com/android/dialer
parent4efd0ebf003e985e7cbe40d8ffd9f7ff227a9611 (diff)
Began implementation of Dialer dark theme.
- README on how to properly theme Dialer going forward. - Migrated all widgets to use global colors. - Removed all activity and application themes where it wasn't necessary. - Added themeing test rule for Espresso tests. Bug: 79883035 Test: tap PiperOrigin-RevId: 197634256 Change-Id: I4b7d94d45aeeb59d484b0069fdd1e200a654910b
Diffstat (limited to 'java/com/android/dialer')
-rw-r--r--java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java15
-rw-r--r--java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java1
-rw-r--r--java/com/android/dialer/app/filterednumber/BlockedNumbersFragment.java4
-rw-r--r--java/com/android/dialer/app/list/RemoveView.java2
-rw-r--r--java/com/android/dialer/app/res/drawable/rounded_corner.xml2
-rw-r--r--java/com/android/dialer/app/res/drawable/seekbar_drawable.xml8
-rw-r--r--java/com/android/dialer/app/res/layout-land/empty_content_view_dialpad_search.xml3
-rw-r--r--java/com/android/dialer/app/res/layout/blocked_number_footer.xml3
-rw-r--r--java/com/android/dialer/app/res/layout/blocked_number_fragment.xml2
-rw-r--r--java/com/android/dialer/app/res/layout/blocked_number_header.xml14
-rw-r--r--java/com/android/dialer/app/res/layout/blocked_number_item.xml11
-rw-r--r--java/com/android/dialer/app/res/layout/call_log_activity.xml2
-rw-r--r--java/com/android/dialer/app/res/layout/call_log_fragment.xml3
-rw-r--r--java/com/android/dialer/app/res/layout/call_log_list_item.xml30
-rw-r--r--java/com/android/dialer/app/res/layout/call_log_list_item_actions.xml2
-rw-r--r--java/com/android/dialer/app/res/layout/dialtacts_activity.xml4
-rw-r--r--java/com/android/dialer/app/res/layout/empty_content_view_dialpad_search.xml5
-rw-r--r--java/com/android/dialer/app/res/layout/lists_fragment.xml6
-rw-r--r--java/com/android/dialer/app/res/layout/phone_favorite_tile_view.xml6
-rw-r--r--java/com/android/dialer/app/res/layout/search_edittext.xml7
-rw-r--r--java/com/android/dialer/app/res/layout/view_numbers_to_import_fragment.xml2
-rw-r--r--java/com/android/dialer/app/res/layout/voicemail_playback_layout.xml10
-rw-r--r--java/com/android/dialer/app/res/values-v27/styles.xml2
-rw-r--r--java/com/android/dialer/app/res/values/colors.xml57
-rw-r--r--java/com/android/dialer/app/res/values/styles.xml33
-rw-r--r--java/com/android/dialer/blockreportspam/res/layout/block_report_spam_dialog.xml3
-rw-r--r--java/com/android/dialer/callcomposer/res/layout/call_composer_activity.xml13
-rw-r--r--java/com/android/dialer/callcomposer/res/layout/fragment_message_composer.xml2
-rw-r--r--java/com/android/dialer/callcomposer/res/layout/permission_view.xml2
-rw-r--r--java/com/android/dialer/callcomposer/res/values/styles.xml6
-rw-r--r--java/com/android/dialer/calldetails/AndroidManifest.xml6
-rw-r--r--java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java2
-rw-r--r--java/com/android/dialer/calldetails/res/layout/call_details_entry.xml13
-rw-r--r--java/com/android/dialer/calldetails/res/layout/call_details_footer.xml7
-rw-r--r--java/com/android/dialer/calldetails/res/layout/caller_id_report_dialog.xml4
-rw-r--r--java/com/android/dialer/calldetails/res/layout/contact_container.xml10
-rw-r--r--java/com/android/dialer/calldetails/res/layout/ec_data_container.xml7
-rw-r--r--java/com/android/dialer/calldetails/res/values/styles.xml5
-rw-r--r--java/com/android/dialer/calllog/ui/NewCallLogFragment.java1
-rw-r--r--java/com/android/dialer/calllog/ui/res/layout/new_call_log_entry.xml18
-rw-r--r--java/com/android/dialer/calllog/ui/res/layout/new_call_log_header.xml2
-rw-r--r--java/com/android/dialer/calllog/ui/res/layout/new_call_log_promotion_card.xml7
-rw-r--r--java/com/android/dialer/calllog/ui/res/values/colors.xml3
-rw-r--r--java/com/android/dialer/calllog/ui/res/values/strings.xml1
-rw-r--r--java/com/android/dialer/calllog/ui/res/values/styles.xml25
-rw-r--r--java/com/android/dialer/calllogutils/CallTypeIconsView.java8
-rw-r--r--java/com/android/dialer/calllogutils/res/values/colors.xml4
-rw-r--r--java/com/android/dialer/contactsfragment/res/drawable/fast_scroller_scroll_bar.xml2
-rw-r--r--java/com/android/dialer/contactsfragment/res/layout/add_contact_row.xml1
-rw-r--r--java/com/android/dialer/contactsfragment/res/layout/contact_row.xml2
-rw-r--r--java/com/android/dialer/contactsfragment/res/layout/fragment_contacts.xml4
-rw-r--r--java/com/android/dialer/contactsfragment/res/layout/header.xml3
-rw-r--r--java/com/android/dialer/dialpadview/res/layout-land/dialpad_fragment.xml2
-rw-r--r--java/com/android/dialer/dialpadview/res/layout/dialpad_fragment.xml6
-rw-r--r--java/com/android/dialer/dialpadview/res/layout/dialpad_view_unthemed.xml8
-rw-r--r--java/com/android/dialer/dialpadview/theme/res/values/attr.xml2
-rw-r--r--java/com/android/dialer/dialpadview/theme/res/values/styles.xml10
-rw-r--r--java/com/android/dialer/enrichedcall/simulator/AndroidManifest.xml3
-rw-r--r--java/com/android/dialer/historyitemactions/HistoryItemActionBottomSheet.java6
-rw-r--r--java/com/android/dialer/historyitemactions/res/layout/contact_layout.xml4
-rw-r--r--java/com/android/dialer/historyitemactions/res/layout/module_layout.xml2
-rw-r--r--java/com/android/dialer/historyitemactions/res/values/styles.xml2
-rw-r--r--java/com/android/dialer/inject/ContextModule.java2
-rw-r--r--java/com/android/dialer/main/impl/OldMainActivityPeer.java19
-rw-r--r--java/com/android/dialer/main/impl/bottomnav/BottomNavItem.java2
-rw-r--r--java/com/android/dialer/main/impl/bottomnav/res/drawable/notification_badge.xml2
-rw-r--r--java/com/android/dialer/main/impl/bottomnav/res/layout/bottom_nav_item.xml5
-rw-r--r--java/com/android/dialer/main/impl/res/layout/promotion_bottom_sheet.xml7
-rw-r--r--java/com/android/dialer/main/impl/res/values-v27/styles.xml9
-rw-r--r--java/com/android/dialer/main/impl/res/values/styles.xml11
-rw-r--r--java/com/android/dialer/main/impl/toolbar/res/drawable/search_bar_background.xml2
-rw-r--r--java/com/android/dialer/main/impl/toolbar/res/drawable/search_bar_background_rounded_corners.xml2
-rw-r--r--java/com/android/dialer/main/impl/toolbar/res/layout/expanded_search_bar.xml4
-rw-r--r--java/com/android/dialer/main/impl/toolbar/res/layout/toolbar_layout.xml13
-rw-r--r--java/com/android/dialer/postcall/AndroidManifest.xml1
-rw-r--r--java/com/android/dialer/rtt/AndroidManifest.xml3
-rw-r--r--java/com/android/dialer/rtt/res/color/bubble_background.xml2
-rw-r--r--java/com/android/dialer/rtt/res/drawable/message_bubble.xml2
-rw-r--r--java/com/android/dialer/searchfragment/common/res/layout/search_contact_row.xml3
-rw-r--r--java/com/android/dialer/searchfragment/list/res/layout/fragment_search.xml4
-rw-r--r--java/com/android/dialer/searchfragment/list/res/layout/header_layout.xml2
-rw-r--r--java/com/android/dialer/searchfragment/nearbyplaces/res/layout/location_permission_row.xml3
-rw-r--r--java/com/android/dialer/shortcuts/res/drawable/ic_add_contact_foreground.xml3
-rw-r--r--java/com/android/dialer/shortcuts/res/drawable/ic_shortcut_add_contact.xml4
-rw-r--r--java/com/android/dialer/speeddial/res/drawable/context_menu_background.xml26
-rw-r--r--java/com/android/dialer/speeddial/res/drawable/context_menu_contact_icon.xml2
-rw-r--r--java/com/android/dialer/speeddial/res/layout/disambig_dialog_layout.xml2
-rw-r--r--java/com/android/dialer/speeddial/res/layout/fragment_speed_dial.xml2
-rw-r--r--java/com/android/dialer/speeddial/res/layout/suggestion_row_layout.xml2
-rw-r--r--java/com/android/dialer/speeddial/res/menu/starred_contact_context_menu.xml8
-rw-r--r--java/com/android/dialer/speeddial/res/values/styles.xml2
-rw-r--r--java/com/android/dialer/theme/AndroidManifest.xml3
-rw-r--r--java/com/android/dialer/theme/README.md75
-rw-r--r--java/com/android/dialer/theme/base/AndroidManifest.xml (renamed from java/com/android/dialer/theme/attributes/AndroidManifest.xml)2
-rw-r--r--java/com/android/dialer/theme/base/ThemeUtil.java (renamed from java/com/android/dialer/theme/ThemeUtil.java)83
-rw-r--r--java/com/android/dialer/theme/base/res/values/attr.xml26
-rw-r--r--java/com/android/dialer/theme/base/res/values/styles_dialer_light.xml53
-rw-r--r--java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml64
-rw-r--r--java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml81
-rw-r--r--java/com/android/dialer/theme/common/AndroidManifest.xml (renamed from java/com/android/dialer/theme/attributes/res/values/attr.xml)7
-rw-r--r--java/com/android/dialer/theme/common/res/anim/front_back_switch_button_animation.xml29
-rw-r--r--java/com/android/dialer/theme/common/res/animator/activated_button_elevation.xml (renamed from java/com/android/dialer/theme/res/animator/activated_button_elevation.xml)15
-rw-r--r--java/com/android/dialer/theme/common/res/drawable-hdpi/empty_speed_dial.png (renamed from java/com/android/dialer/theme/res/drawable-hdpi/empty_speed_dial.png)bin3022 -> 3022 bytes
-rw-r--r--java/com/android/dialer/theme/common/res/drawable-mdpi/empty_speed_dial.png (renamed from java/com/android/dialer/theme/res/drawable-mdpi/empty_speed_dial.png)bin2042 -> 2042 bytes
-rw-r--r--java/com/android/dialer/theme/common/res/drawable-xhdpi/empty_speed_dial.png (renamed from java/com/android/dialer/theme/res/drawable-xhdpi/empty_speed_dial.png)bin4490 -> 4490 bytes
-rw-r--r--java/com/android/dialer/theme/common/res/drawable-xxhdpi/empty_speed_dial.png (renamed from java/com/android/dialer/theme/res/drawable-xxhdpi/empty_speed_dial.png)bin5368 -> 5368 bytes
-rw-r--r--java/com/android/dialer/theme/common/res/drawable/front_back_switch_button.xml (renamed from java/com/android/dialer/theme/res/drawable/front_back_switch_button.xml)15
-rw-r--r--java/com/android/dialer/theme/common/res/drawable/front_back_switch_button_animation.xml (renamed from java/com/android/dialer/widget/res/values/colors.xml)15
-rw-r--r--java/com/android/dialer/theme/common/res/drawable/item_background_material_borderless_dark.xml19
-rw-r--r--java/com/android/dialer/theme/common/res/values/colors.xml (renamed from java/com/android/dialer/theme/res/values/colors.xml)4
-rw-r--r--java/com/android/dialer/theme/common/res/values/dimens.xml (renamed from java/com/android/dialer/theme/res/values/dimens.xml)4
-rw-r--r--java/com/android/dialer/theme/common/res/values/strings.xml (renamed from java/com/android/dialer/theme/res/values/strings.xml)0
-rw-r--r--java/com/android/dialer/theme/common/res/values/styles.xml34
-rw-r--r--java/com/android/dialer/theme/common/res/values/text_styles.xml87
-rw-r--r--java/com/android/dialer/theme/private/AndroidManifest.xml16
-rw-r--r--java/com/android/dialer/theme/private/res/color/dialer_dark_primary_text_color.xml (renamed from java/com/android/dialer/widget/res/drawable/ripple_material_light.xml)14
-rw-r--r--java/com/android/dialer/theme/private/res/color/dialer_dark_secondary_text_color.xml21
-rw-r--r--java/com/android/dialer/theme/private/res/color/dialer_primary_text_color.xml (renamed from java/com/android/dialer/theme/res/color/dialer_primary_text_color.xml)0
-rw-r--r--java/com/android/dialer/theme/private/res/color/dialer_secondary_text_color.xml (renamed from java/com/android/dialer/theme/res/color/dialer_secondary_text_color.xml)0
-rw-r--r--java/com/android/dialer/theme/private/res/color/settings_text_color_primary.xml (renamed from java/com/android/dialer/theme/res/color/settings_text_color_primary.xml)4
-rw-r--r--java/com/android/dialer/theme/private/res/color/settings_text_color_secondary.xml (renamed from java/com/android/dialer/theme/res/color/settings_text_color_secondary.xml)4
-rw-r--r--java/com/android/dialer/theme/private/res/values/colors_dialer_dark.xml40
-rw-r--r--java/com/android/dialer/theme/private/res/values/colors_dialer_light.xml (renamed from java/com/android/dialer/theme/res/values/colors_dialer_light.xml)8
-rw-r--r--java/com/android/dialer/theme/private/res/values/styles.xml55
-rw-r--r--java/com/android/dialer/theme/res/anim/front_back_switch_button_animation.xml14
-rw-r--r--java/com/android/dialer/theme/res/drawable/front_back_switch_button_animation.xml8
-rw-r--r--java/com/android/dialer/theme/res/values/styles_dialer_light.xml110
-rw-r--r--java/com/android/dialer/voicemail/listui/NewVoicemailFragment.java1
-rw-r--r--java/com/android/dialer/voicemail/listui/error/res/layout/voicemail_error_message_fragment.xml7
-rw-r--r--java/com/android/dialer/voicemail/listui/error/res/values/styles.xml4
-rw-r--r--java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry.xml14
-rw-r--r--java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry_alert.xml7
-rw-r--r--java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry_header.xml2
-rw-r--r--java/com/android/dialer/voicemail/listui/res/values/styles.xml2
-rw-r--r--java/com/android/dialer/widget/EmptyContentView.java11
-rw-r--r--java/com/android/dialer/widget/res/layout-land/empty_content_view.xml2
-rw-r--r--java/com/android/dialer/widget/res/layout/contact_photo_view.xml2
-rw-r--r--java/com/android/dialer/widget/res/layout/dialer_toolbar.xml12
-rw-r--r--java/com/android/dialer/widget/res/layout/empty_content_view.xml2
-rw-r--r--java/com/android/dialer/widget/res/layout/fragment_message.xml2
-rw-r--r--java/com/android/dialer/widget/res/layout/selectable_text_view.xml5
141 files changed, 980 insertions, 592 deletions
diff --git a/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java b/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java
index 230c02328..108a11bbe 100644
--- a/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java
+++ b/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java
@@ -51,6 +51,7 @@ import com.android.dialer.oem.MotorolaUtils;
import com.android.dialer.phonenumberutil.PhoneNumberHelper;
import com.android.dialer.spannable.ContentWithLearnMoreSpanner;
import com.android.dialer.storage.StorageComponent;
+import com.android.dialer.theme.base.ThemeUtil;
import com.android.dialer.util.DialerUtils;
import com.android.voicemail.VoicemailClient;
import com.android.voicemail.VoicemailComponent;
@@ -269,9 +270,7 @@ public class PhoneCallDetailsHelper
views.voicemailTranscriptionBrandingView.setTypeface(typeface);
views.callLocationAndDate.setTypeface(typeface);
views.callLocationAndDate.setTextColor(
- ContextCompat.getColor(
- context,
- details.isRead ? R.color.call_log_detail_color : R.color.call_log_unread_text_color));
+ details.isRead ? ThemeUtil.getTextColorSecondary() : ThemeUtil.getTextColorPrimary());
}
private void setNameView(PhoneCallDetailsViews views, PhoneCallDetails details) {
@@ -392,17 +391,11 @@ public class PhoneCallDetailsHelper
textView.setMovementMethod(LinkMovementMethod.getInstance());
Button positiveButton = dialog.getButton(DialogInterface.BUTTON_POSITIVE);
if (positiveButton != null) {
- positiveButton.setTextColor(
- context
- .getResources()
- .getColor(R.color.voicemail_donation_promo_positive_button_text_color));
+ positiveButton.setTextColor(ThemeUtil.getColorPrimary());
}
Button negativeButton = dialog.getButton(DialogInterface.BUTTON_NEGATIVE);
if (negativeButton != null) {
- negativeButton.setTextColor(
- context
- .getResources()
- .getColor(R.color.voicemail_donation_promo_negative_button_text_color));
+ negativeButton.setTextColor(ThemeUtil.getTextColorSecondary());
}
}
diff --git a/java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java b/java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java
index 5b6eb0387..930edd186 100644
--- a/java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java
+++ b/java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java
@@ -113,7 +113,6 @@ public class VisualVoicemailCallLogFragment extends CallLogFragment {
setupView(view);
EmptyContentView emptyContentView = view.findViewById(R.id.empty_list_view);
emptyContentView.setImage(R.drawable.quantum_ic_voicemail_vd_theme_24);
- emptyContentView.setImageTint(R.color.empty_voicemail_icon_tint_color, null);
return view;
}
diff --git a/java/com/android/dialer/app/filterednumber/BlockedNumbersFragment.java b/java/com/android/dialer/app/filterednumber/BlockedNumbersFragment.java
index 270ec6d03..ab03080f4 100644
--- a/java/com/android/dialer/app/filterednumber/BlockedNumbersFragment.java
+++ b/java/com/android/dialer/app/filterednumber/BlockedNumbersFragment.java
@@ -39,6 +39,7 @@ import com.android.dialer.blocking.FilteredNumbersUtil.CheckForSendToVoicemailCo
import com.android.dialer.blocking.FilteredNumbersUtil.ImportSendToVoicemailContactsListener;
import com.android.dialer.database.FilteredNumberContract;
import com.android.dialer.lettertile.LetterTileDrawable;
+import com.android.dialer.theme.base.ThemeUtil;
import com.android.dialer.voicemailstatus.VisualVoicemailEnabledChecker;
/** TODO(calderwoodra): documentation */
@@ -74,8 +75,7 @@ public class BlockedNumbersFragment extends ListFragment
//replace the icon for add number with LetterTileDrawable(), so it will have identical style
LetterTileDrawable drawable = new LetterTileDrawable(getResources());
drawable.setLetter(ADD_BLOCKED_NUMBER_ICON_LETTER);
- drawable.setColor(
- ActivityCompat.getColor(getActivity(), R.color.add_blocked_number_icon_color));
+ drawable.setColor(ThemeUtil.getColorIcon());
drawable.setIsCircular(true);
if (adapter == null) {
diff --git a/java/com/android/dialer/app/list/RemoveView.java b/java/com/android/dialer/app/list/RemoveView.java
index ed133d45b..575c5a890 100644
--- a/java/com/android/dialer/app/list/RemoveView.java
+++ b/java/com/android/dialer/app/list/RemoveView.java
@@ -53,7 +53,7 @@ public class RemoveView extends FrameLayout {
removeText = (TextView) findViewById(R.id.remove_view_text);
removeIcon = (ImageView) findViewById(R.id.remove_view_icon);
final Resources r = getResources();
- unhighlightedColor = r.getColor(R.color.remove_text_color);
+ unhighlightedColor = r.getColor(android.R.color.white);
highlightedColor = r.getColor(R.color.remove_highlighted_text_color);
removeDrawable = r.getDrawable(R.drawable.ic_remove);
}
diff --git a/java/com/android/dialer/app/res/drawable/rounded_corner.xml b/java/com/android/dialer/app/res/drawable/rounded_corner.xml
index 97b58b6b1..b4c10066d 100644
--- a/java/com/android/dialer/app/res/drawable/rounded_corner.xml
+++ b/java/com/android/dialer/app/res/drawable/rounded_corner.xml
@@ -17,6 +17,6 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
- <solid android:color="@color/searchbox_background_color"/>
+ <solid android:color="?android:attr/colorBackgroundFloating"/>
<corners android:radius="2dp"/>
</shape>
diff --git a/java/com/android/dialer/app/res/drawable/seekbar_drawable.xml b/java/com/android/dialer/app/res/drawable/seekbar_drawable.xml
index e47a6406c..2288cf24a 100644
--- a/java/com/android/dialer/app/res/drawable/seekbar_drawable.xml
+++ b/java/com/android/dialer/app/res/drawable/seekbar_drawable.xml
@@ -19,7 +19,7 @@
<item android:id="@android:id/background">
<shape android:shape="line">
<stroke
- android:color="@color/voicemail_playback_seek_bar_yet_to_play"
+ android:color="@color/dialer_divider_line_color"
android:width="2dip"
/>
</shape>
@@ -29,7 +29,7 @@
<clip>
<shape android:shape="line">
<stroke
- android:color="@color/voicemail_playback_seek_bar_already_played"
+ android:color="?android:attr/colorPrimary"
android:width="2dip"
/>
</shape>
@@ -42,7 +42,7 @@
<item android:id="@android:id/background">
<shape android:shape="line">
<stroke
- android:color="@color/voicemail_playback_seek_bar_yet_to_play"
+ android:color="@color/dialer_divider_line_color"
android:width="2dip"
/>
</shape>
@@ -52,7 +52,7 @@
<clip>
<shape android:shape="line">
<stroke
- android:color="@color/voicemail_playback_seek_bar_yet_to_play"
+ android:color="@color/dialer_divider_line_color"
android:width="2dip"
/>
</shape>
diff --git a/java/com/android/dialer/app/res/layout-land/empty_content_view_dialpad_search.xml b/java/com/android/dialer/app/res/layout-land/empty_content_view_dialpad_search.xml
index 59d13636a..bf2a816b0 100644
--- a/java/com/android/dialer/app/res/layout-land/empty_content_view_dialpad_search.xml
+++ b/java/com/android/dialer/app/res/layout-land/empty_content_view_dialpad_search.xml
@@ -41,8 +41,7 @@
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:gravity="center_horizontal|top"
- android:textColor="@color/empty_list_text_color"
- android:textSize="@dimen/empty_list_message_text_size"/>
+ style="Dialer.TextAppearance.Primary"/>
<TextView
android:id="@+id/empty_list_view_action"
diff --git a/java/com/android/dialer/app/res/layout/blocked_number_footer.xml b/java/com/android/dialer/app/res/layout/blocked_number_footer.xml
index 9e05cfbf4..2d368605c 100644
--- a/java/com/android/dialer/app/res/layout/blocked_number_footer.xml
+++ b/java/com/android/dialer/app/res/layout/blocked_number_footer.xml
@@ -32,7 +32,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/block_number_footer_message_vvm"
- android:textColor="@color/blocked_number_secondary_text_color"
- android:textSize="@dimen/blocked_number_settings_description_text_size"/>
+ style="@style/Dialer.TextAppearance.Secondary"/>
</LinearLayout>
</LinearLayout>
diff --git a/java/com/android/dialer/app/res/layout/blocked_number_fragment.xml b/java/com/android/dialer/app/res/layout/blocked_number_fragment.xml
index 745b913cc..22dcfefa5 100644
--- a/java/com/android/dialer/app/res/layout/blocked_number_fragment.xml
+++ b/java/com/android/dialer/app/res/layout/blocked_number_fragment.xml
@@ -17,7 +17,7 @@
android:id="@+id/blocked_number_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/blocked_number_background"
+ android:background="?android:attr/colorBackground"
android:orientation="vertical">
<ListView
diff --git a/java/com/android/dialer/app/res/layout/blocked_number_header.xml b/java/com/android/dialer/app/res/layout/blocked_number_header.xml
index e1019d1eb..27b624ccd 100644
--- a/java/com/android/dialer/app/res/layout/blocked_number_header.xml
+++ b/java/com/android/dialer/app/res/layout/blocked_number_header.xml
@@ -29,7 +29,7 @@
android:paddingBottom="29dp"
android:paddingStart="@dimen/blocked_number_container_padding"
android:paddingEnd="44dp"
- android:background="@color/blocked_number_disabled_emergency_background_color"
+ android:background="?android:attr/colorBackground"
android:focusable="true"
android:orientation="vertical"
android:visibility="gone">
@@ -69,7 +69,7 @@
android:paddingStart="@dimen/blocked_number_container_padding"
android:gravity="center_vertical"
android:text="@string/block_list"
- android:textColor="@color/blocked_number_header_color"/>
+ android:textColor="?android:attr/textColorPrimary"/>
<RelativeLayout
android:id="@+id/import_settings"
@@ -88,7 +88,7 @@
android:paddingStart="@dimen/blocked_number_container_padding"
android:paddingEnd="@dimen/blocked_number_container_padding"
android:text="@string/blocked_call_settings_import_description"
- android:textColor="@color/secondary_text_color"
+ android:textColor="?colorIcon"
android:textSize="@dimen/blocked_number_settings_description_text_size"/>
<Button
@@ -116,7 +116,7 @@
android:layout_height="1dp"
android:layout_marginTop="8dp"
android:layout_below="@id/import_button"
- android:background="@color/divider_line_color"/>
+ android:background="@color/dialer_divider_line_color"/>
</RelativeLayout>
@@ -138,7 +138,7 @@
android:paddingEnd="@dimen/blocked_number_container_padding"
android:gravity="center_vertical"
android:text="@string/migrate_blocked_numbers_dialog_title"
- android:textColor="@color/blocked_number_header_color"/>
+ android:textColor="?android:attr/textColorPrimary"/>
<TextView
android:id="@+id/migrate_promo_description"
@@ -148,7 +148,7 @@
android:layout_marginStart="@dimen/blocked_number_container_padding"
android:layout_marginEnd="@dimen/blocked_number_container_padding"
android:text="@string/migrate_blocked_numbers_dialog_message"
- android:textColor="@color/secondary_text_color"/>
+ android:textColor="?colorIcon"/>
<Button
android:id="@+id/migrate_promo_allow_button"
@@ -171,7 +171,7 @@
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="72dp"
- android:background="@color/divider_line_color"/>
+ android:background="@color/dialer_divider_line_color"/>
</LinearLayout>
diff --git a/java/com/android/dialer/app/res/layout/blocked_number_item.xml b/java/com/android/dialer/app/res/layout/blocked_number_item.xml
index 92ebdc35d..921c476ec 100644
--- a/java/com/android/dialer/app/res/layout/blocked_number_item.xml
+++ b/java/com/android/dialer/app/res/layout/blocked_number_item.xml
@@ -45,17 +45,13 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
- android:singleLine="true"
- android:textColor="@color/blocked_number_primary_text_color"
- android:textSize="@dimen/blocked_number_primary_text_size"/>
+ style="@style/Dialer.TextAppearance.Primary.Ellipsize"/>
<TextView
android:id="@+id/caller_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:singleLine="true"
- android:textColor="@color/blocked_number_secondary_text_color"
- android:textSize="@dimen/blocked_number_settings_description_text_size"/>
+ style="@style/Dialer.TextAppearance.Secondary.Ellipsize"/>
</LinearLayout>
<ImageView
@@ -67,6 +63,5 @@
android:contentDescription="@string/description_blocked_number_list_delete"
android:scaleType="center"
android:src="@drawable/ic_remove"
- android:tint="@color/blocked_number_icon_tint"/>
-
+ android:tint="?colorIcon"/>
</LinearLayout>
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 d9d40a1a0..4b3c1e0f6 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="?android:attr/colorBackgroundFloating"
+ android:background="?android:attr/colorBackground"
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 2fb63606a..bf91a3a07 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
@@ -47,8 +47,7 @@
android:gravity="center_vertical"
android:text="@string/select_all"
android:textAllCaps="true"
- android:textStyle="bold"
- android:textColor="@color/remove_text_color"
+ android:textColor="?android:attr/textColorPrimaryInverse"
android:textSize="@dimen/select_all_text_size"/>
</LinearLayout>
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 23aeda3da..fd73e0bb4 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
@@ -29,11 +29,9 @@
android:layout_gravity="start"
android:layout_marginStart="@dimen/call_log_start_margin"
android:layout_marginEnd="@dimen/call_log_outer_margin"
- android:fontFamily="sans-serif-medium"
- android:textColor="@color/call_log_day_group_heading_color"
- android:textSize="@dimen/call_log_day_group_heading_size"
android:paddingTop="@dimen/call_log_day_group_padding_top"
- android:paddingBottom="@dimen/call_log_day_group_padding_bottom"/>
+ android:paddingBottom="@dimen/call_log_day_group_padding_bottom"
+ style="@style/Dialer.TextAppearance.OVERLINE.Ellipsize"/>
<android.support.v7.widget.CardView
android:id="@+id/call_log_row"
@@ -99,9 +97,7 @@
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/call_log_name_margin_bottom"
android:layout_marginEnd="@dimen/call_log_icon_margin"
- android:textColor="@color/call_log_primary_color"
- android:textSize="@dimen/call_log_primary_text_size"
- android:maxLines="1"/>
+ style="Dialer.TextAppearance.Primary.Ellipsize"/>
<LinearLayout
android:id="@+id/call_type"
@@ -131,9 +127,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/call_log_icon_margin"
android:layout_gravity="center_vertical"
- android:textColor="@color/call_log_detail_color"
- android:textSize="@dimen/call_log_detail_text_size"
- android:maxLines="1"/>
+ style="Dialer.TextAppearance.Secondary.Ellipsize"/>
</LinearLayout>
@@ -143,10 +137,8 @@
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:attr/textColorSecondary"
- android:textSize="@dimen/call_log_detail_text_size"
android:visibility="gone"
- android:maxLines="1"/>
+ style="Dialer.TextAppearance.Secondary2.Ellipsize"/>
<LinearLayout
android:id="@+id/transcription"
@@ -160,22 +152,20 @@
android:id="@+id/voicemail_transcription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="@color/call_log_voicemail_transcript_color"
- android:textSize="@dimen/call_log_voicemail_transcription_text_size"
android:focusable="true"
android:nextFocusDown="@+id/voicemail_transcription_branding"
- android:textIsSelectable="true"/>
+ android:textIsSelectable="true"
+ style="Dialer.TextAppearance.Secondary2"/>
<TextView
android:id="@+id/voicemail_transcription_branding"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="@color/call_log_voicemail_transcript_branding_color"
- android:textSize="@dimen/call_log_voicemail_transcription_text_size"
android:focusable="true"
android:nextFocusUp="@id/voicemail_transcription"
android:nextFocusDown="@+id/voicemail_transcription_rating"
- android:paddingTop="2dp"/>
+ android:paddingTop="2dp"
+ style="Dialer.TextAppearance.Secondary2"/>
<LinearLayout
android:id="@+id/voicemail_transcription_rating"
@@ -230,7 +220,7 @@
android:layout_gravity="center_vertical"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:scaleType="center"
- android:tint="@color/call_log_list_item_primary_action_icon_tint"
+ android:tint="?colorIcon"
android:visibility="gone"/>
</LinearLayout>
diff --git a/java/com/android/dialer/app/res/layout/call_log_list_item_actions.xml b/java/com/android/dialer/app/res/layout/call_log_list_item_actions.xml
index 56d1daf6a..7f2459486 100644
--- a/java/com/android/dialer/app/res/layout/call_log_list_item_actions.xml
+++ b/java/com/android/dialer/app/res/layout/call_log_list_item_actions.xml
@@ -31,7 +31,7 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
- android:background="@color/call_log_action_divider"/>
+ android:background="@color/dialer_divider_line_color"/>
<LinearLayout
android:id="@+id/call_action"
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 cf6591b63..f8e3000d4 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="?android:attr/colorBackgroundFloating"
+ android:background="?android:attr/colorBackground"
android:clipChildren="false"
android:clipToPadding="false"
android:focusable="true"
@@ -48,7 +48,7 @@
android:contentDescription="@string/action_menu_dialpad_button"
android:src="@drawable/quantum_ic_dialpad_white_24"
app:elevation="@dimen/floating_action_button_translation_z"
- app:backgroundTint="@color/dialer_secondary_color"/>
+ app:backgroundTint="?android:attr/colorAccent"/>
<!-- Host container for the contact tile drag shadow -->
<FrameLayout
diff --git a/java/com/android/dialer/app/res/layout/empty_content_view_dialpad_search.xml b/java/com/android/dialer/app/res/layout/empty_content_view_dialpad_search.xml
index 1d2047982..437fa7d18 100644
--- a/java/com/android/dialer/app/res/layout/empty_content_view_dialpad_search.xml
+++ b/java/com/android/dialer/app/res/layout/empty_content_view_dialpad_search.xml
@@ -28,12 +28,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal|top"
- android:textSize="@dimen/empty_list_message_text_size"
- android:textColor="@color/empty_list_text_color"
android:paddingRight="16dp"
android:paddingLeft="16dp"
android:paddingTop="8dp"
- android:paddingBottom="8dp"/>
+ android:paddingBottom="8dp"
+ style="Dialer.TextAppearance.Primary.Ellipsize"/>
<TextView
android:id="@+id/empty_list_view_action"
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 1126b0e51..6be1fe08f 100644
--- a/java/com/android/dialer/app/res/layout/lists_fragment.xml
+++ b/java/com/android/dialer/app/res/layout/lists_fragment.xml
@@ -81,15 +81,15 @@
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:src="@drawable/ic_remove"
- android:tint="@color/remove_text_color"/>
+ android:tint="?colorTextOnUnthemedDarkBackground"/>
<TextView
android:id="@+id/remove_view_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/remove_contact"
- android:textColor="@color/remove_text_color"
- android:textSize="@dimen/remove_text_size"/>
+ android:textColor="?colorTextOnUnthemedDarkBackground"
+ style="@style/Dialer.TextAppearance.Primary"/>
</LinearLayout>
diff --git a/java/com/android/dialer/app/res/layout/phone_favorite_tile_view.xml b/java/com/android/dialer/app/res/layout/phone_favorite_tile_view.xml
index 3aeba98a7..df7ce5c55 100644
--- a/java/com/android/dialer/app/res/layout/phone_favorite_tile_view.xml
+++ b/java/com/android/dialer/app/res/layout/phone_favorite_tile_view.xml
@@ -74,7 +74,7 @@
android:fontFamily="sans-serif-medium"
android:singleLine="true"
android:textAlignment="viewStart"
- android:textColor="@color/contact_tile_name_color"
+ android:textColor="?colorTextOnUnthemedDarkBackground"
android:textSize="15sp"/>
<ImageView
android:id="@+id/contact_star_icon"
@@ -95,7 +95,7 @@
android:gravity="center_vertical"
android:singleLine="true"
android:textAlignment="viewStart"
- android:textColor="@color/contact_tile_name_color"
+ android:textColor="?colorTextOnUnthemedDarkBackground"
android:textSize="11sp"/>
</LinearLayout>
@@ -103,7 +103,7 @@
android:id="@+id/contact_tile_push_state"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@drawable/item_background_material_dark"
+ android:background="?android:selectableItemBackground"
android:importantForAccessibility="no"/>
<!-- Wrap the ImageButton in a layout with a transparent background so the ripple has something to draw on -->
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 8a2cfd483..aba5ba8ea 100644
--- a/java/com/android/dialer/app/res/layout/search_edittext.xml
+++ b/java/com/android/dialer/app/res/layout/search_edittext.xml
@@ -43,7 +43,7 @@
android:importantForAccessibility="no"
android:scaleType="center"
android:src="@drawable/quantum_ic_search_vd_theme_24"
- android:tint="@color/searchbox_icon_tint"/>
+ android:tint="?colorIcon"/>
<TextView
android:id="@+id/search_box_start_search"
@@ -55,7 +55,6 @@
android:fontFamily="@string/search_font_family"
android:gravity="center_vertical"
android:hint="@string/dialer_hint_find_contact"
- android:textColorHint="@color/searchbox_hint_text_color"
android:textSize="@dimen/search_collapsed_text_size"/>
<ImageView
@@ -68,7 +67,7 @@
android:contentDescription="@string/description_start_voice_search"
android:scaleType="center"
android:src="@drawable/ic_mic_grey600"
- android:tint="@color/searchbox_icon_tint"/>
+ android:tint="?colorIcon"/>
<ImageButton
android:id="@+id/dialtacts_options_menu_button"
@@ -79,7 +78,7 @@
android:contentDescription="@string/action_menu_overflow_description"
android:scaleType="center"
android:src="@drawable/quantum_ic_more_vert_white_24"
- android:tint="@color/searchbox_icon_tint"/>
+ android:tint="?colorIcon"/>
</RelativeLayout>
<include layout="@layout/search_bar_expanded"/>
diff --git a/java/com/android/dialer/app/res/layout/view_numbers_to_import_fragment.xml b/java/com/android/dialer/app/res/layout/view_numbers_to_import_fragment.xml
index be691748a..e821c0637 100644
--- a/java/com/android/dialer/app/res/layout/view_numbers_to_import_fragment.xml
+++ b/java/com/android/dialer/app/res/layout/view_numbers_to_import_fragment.xml
@@ -16,7 +16,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/blocked_number_background"
+ android:background="?android:attr/colorBackground"
android:orientation="vertical">
<ListView
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 a9b866e89..c352e02d1 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
@@ -28,7 +28,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
- android:textSize="14sp"/>
+ style="@style/Dialer.TextAppearance.Secondary"/>
<LinearLayout
android:layout_width="match_parent"
@@ -42,7 +42,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:importantForAccessibility="no"
- android:textSize="14sp"/>
+ style="@style/Dialer.TextAppearance.Secondary"/>
<SeekBar
android:id="@+id/playback_seek"
@@ -60,7 +60,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:importantForAccessibility="no"
- android:textSize="14sp"/>
+ style="@style/Dialer.TextAppearance.Secondary"/>
</LinearLayout>
@@ -80,7 +80,7 @@
style="@style/VoicemailPlaybackLayoutButtonStyle"
android:contentDescription="@string/description_playback_speakerphone"
android:src="@drawable/quantum_ic_volume_down_white_24"
- android:tint="@color/voicemail_icon_tint"/>
+ android:tint="?colorIcon"/>
<Space
android:layout_width="0dp"
@@ -103,7 +103,7 @@
style="@style/VoicemailPlaybackLayoutButtonStyle"
android:contentDescription="@string/call_log_trash_voicemail"
android:src="@drawable/quantum_ic_delete_white_24"
- android:tint="@color/voicemail_icon_tint"/>
+ android:tint="?colorIcon"/>
<Space
android:layout_width="0dp"
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 76ae4ba62..bc9b119a5 100644
--- a/java/com/android/dialer/app/res/values-v27/styles.xml
+++ b/java/com/android/dialer/app/res/values-v27/styles.xml
@@ -15,7 +15,7 @@
~ limitations under the License
-->
<resources>
- <style name="DialtactsTheme" parent="Dialer.ThemeBase">
+ <style name="DialtactsTheme" parent="Dialer.ThemeBase.ActionBar">
<item name="android:windowLightNavigationBar">true</item>
<item name="android:navigationBarColor">?android:attr/windowBackground</item>
<item name="android:navigationBarDividerColor">#E0E0E0</item>
diff --git a/java/com/android/dialer/app/res/values/colors.xml b/java/com/android/dialer/app/res/values/colors.xml
index 2b8d63ac0..a9713474d 100644
--- a/java/com/android/dialer/app/res/values/colors.xml
+++ b/java/com/android/dialer/app/res/values/colors.xml
@@ -15,67 +15,12 @@
-->
<resources>
- <color name="dialer_flat_button_text_color">?android:attr/colorPrimary</color>
-
- <color name="setting_background_color">#ffffff</color>
-
- <!-- 54% black -->
- <color name="call_log_icon_tint">#8a000000</color>
- <!-- 87% black -->
- <color name="call_log_primary_color">#de000000</color>
- <!-- 54% black -->
- <color name="call_log_detail_color">#8a000000</color>
- <!-- 87% black -->
- <color name="call_log_voicemail_transcript_color">#de000000</color>
- <!-- 54% black -->
- <color name="call_log_voicemail_transcript_branding_color">#8a000000</color>
- <!-- 100% blue -->
- <color name="call_log_voicemail_transcript_rating_color">#ff2a56c6</color>
- <!-- 70% black -->
- <color name="call_log_action_color">#b3000000</color>
- <!-- 54% black -->
- <color name="call_log_day_group_heading_color">#8a000000</color>
- <!-- 87% black-->
- <color name="call_log_unread_text_color">#de000000</color>
- <color name="call_log_list_item_primary_action_icon_tint">@color/call_log_icon_tint</color>
-
- <color name="voicemail_icon_tint">@color/call_log_icon_tint</color>
<color name="voicemail_icon_disabled_tint">#80000000</color>
- <color name="voicemail_playpause_icon_tint">@color/voicemail_icon_tint</color>
- <!-- 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">?android:attr/colorPrimary</color>
-
- <!-- Background color for search results and call details -->
- <color name="background_dialer_results">#f9f9f9</color>
-
- <!-- Color of the contact name in favorite tiles -->
- <color name="contact_tile_name_color">#ffffff</color>
-
- <color name="contact_list_name_text_color">@color/dialer_primary_text_color</color>
-
- <color name="remove_text_color">#ffffff</color>
+ <color name="voicemail_playpause_icon_tint">?colorIcon</color>
<!-- Text color for the "Remove" text when a contact is dragged on top of the remove view -->
<color name="remove_highlighted_text_color">#FF3F3B</color>
- <color name="dialer_dialpad_touch_tint">@color/dialer_theme_color_20pct</color>
-
- <color name="call_log_action_divider">#eeeeee</color>
- <color name="divider_line_color">#D8D8D8</color>
-
<!-- Colors for blocked numbers list -->
- <color name="blocked_number_primary_text_color">@color/dialer_primary_text_color</color>
- <color name="blocked_number_secondary_text_color">@color/dialer_secondary_text_color</color>
- <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">?android:attr/colorPrimary</color>
- <color name="blocked_number_disabled_emergency_background_color">#E0E0E0</color>
- <color name="add_blocked_number_icon_color">#bdbdbd</color>
-
- <color name="voicemail_donation_promo_positive_button_text_color">#FF2A56C6</color>
- <color name="voicemail_donation_promo_negative_button_text_color">#FF757575</color>
-
</resources>
diff --git a/java/com/android/dialer/app/res/values/styles.xml b/java/com/android/dialer/app/res/values/styles.xml
index 54d18f103..c2cad315c 100644
--- a/java/com/android/dialer/app/res/values/styles.xml
+++ b/java/com/android/dialer/app/res/values/styles.xml
@@ -15,7 +15,9 @@
~ limitations under the License
-->
<resources>
- <style name="DialtactsTheme" parent="Dialer.ThemeBase"/>
+ <style name="DialtactsTheme" parent="Dialer.ThemeBase.ActionBar">
+ <!-- todo(calderwoodra): fill this in with dialpad theme and call log card theme -->
+ </style>
<style name="DialpadTheme" parent="DialtactsTheme">
<item name="android:textColorPrimary">?android:attr/textColorPrimaryInverse</item>
@@ -32,13 +34,13 @@
<!-- Text in the action bar at the top of the screen -->
<style name="DialtactsActionBarTitleText"
parent="@android:style/TextAppearance.Material.Widget.ActionBar.Title">
- <item name="android:textColor">@color/actionbar_text_color</item>
+ <item name="android:textColor">?colorTextOnUnthemedDarkBackground</item>
</style>
<!-- Text style for tabs. -->
<style name="DialtactsActionBarTabTextStyle"
parent="android:style/Widget.Material.Light.ActionBar.TabText">
- <item name="android:textColor">@color/tab_text_color</item>
+ <item name="android:textColor">?colorTextOnUnthemedDarkBackground</item>
<item name="android:textSize">@dimen/tab_text_size</item>
<item name="android:fontFamily">"sans-serif-medium"</item>
</style>
@@ -51,29 +53,29 @@
<item name="android:gravity">center_vertical</item>
</style>
- <style name="CallLogActionTextStyle">
+ <style name="CallLogActionTextStyle" parent="Dialer.TextAppearance.Primary.Ellipsize">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</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/call_log_action_color</item>
- <item name="android:textSize">@dimen/call_log_primary_text_size</item>
- <item name="android:fontFamily">"sans-serif"</item>
<item name="android:focusable">true</item>
- <item name="android:singleLine">true</item>
<item name="android:importantForAccessibility">no</item>
</style>
- <style name="CallLogActionSupportTextStyle" parent="@style/CallLogActionTextStyle">
- <item name="android:textSize">@dimen/call_log_detail_text_size</item>
- <item name="android:textColor">@color/call_log_detail_color</item>
+ <style name="CallLogActionSupportTextStyle" parent="Dialer.TextAppearance.Secondary.Ellipsize">
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">wrap_content</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:focusable">true</item>
+ <item name="android:importantForAccessibility">no</item>
</style>
<style name="CallLogActionIconStyle">
<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:attr/textColorSecondary</item>
+ <item name="android:tint">?colorIcon</item>
<item name="android:importantForAccessibility">no</item>
</style>
@@ -122,7 +124,7 @@
<item name="android:background">?android:attr/selectableItemBackground</item>
<item name="android:paddingEnd">@dimen/button_horizontal_padding</item>
<item name="android:paddingStart">@dimen/button_horizontal_padding</item>
- <item name="android:textColor">@color/dialer_flat_button_text_color</item>
+ <item name="android:textColor">?android:attr/colorPrimary</item>
</style>
<!-- Style for the 'primary' button in a view. Unlike the DialerFlatButtonStyle, this button -->
@@ -147,9 +149,7 @@
<item name="android:background">?android:attr/listDivider</item>
</style>
- <style name="TranscriptionQualityRating">
- <item name="android:textColor">@color/call_log_voicemail_transcript_branding_color</item>
- <item name="android:textSize">@dimen/call_log_voicemail_transcription_text_size</item>
+ <style name="TranscriptionQualityRating" parent="Dialer.TextAppearance.Secondary">
<item name="android:textStyle">italic</item>
<item name="android:paddingRight">20dp</item>
<item name="android:minHeight">56dp</item>
@@ -167,5 +167,4 @@
<item name="android:textColor">?android:attr/colorPrimary</item>
<item name="android:fontFamily">"sans-serif-medium"</item>
</style>
-
</resources>
diff --git a/java/com/android/dialer/blockreportspam/res/layout/block_report_spam_dialog.xml b/java/com/android/dialer/blockreportspam/res/layout/block_report_spam_dialog.xml
index 82e8d80b3..9ae30b6cf 100644
--- a/java/com/android/dialer/blockreportspam/res/layout/block_report_spam_dialog.xml
+++ b/java/com/android/dialer/blockreportspam/res/layout/block_report_spam_dialog.xml
@@ -24,8 +24,7 @@
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:text="@string/block_report_number_alert_details"
- android:textColor="@color/block_report_spam_primary_text_color"
- android:textSize="@dimen/blocked_report_spam_primary_text_size"/>
+ style="@style/Dialer.TextAppearance.Primary"/>
<CheckBox
android:id="@+id/report_number_as_spam_action"
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 4d3769b6d..49d278f30 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
@@ -54,7 +54,7 @@
android:gravity="center"
android:maxLines="1"
android:ellipsize="end"
- android:textColor="?android:attr/colorBackground"
+ android:textColor="?android:attr/textColorPrimaryInverse"
android:textSize="@dimen/call_composer_name_text_size"/>
<TextView
@@ -62,10 +62,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
- android:maxLines="1"
- android:ellipsize="end"
- android:textColor="?android:attr/colorBackground"
- android:textSize="@dimen/call_composer_number_text_size"/>
+ android:textColor="?android:attr/textColorPrimaryInverse"
+ style="@style/Dialer.TextAppearance.Primary"/>
</LinearLayout>
<QuickContactBadge
@@ -151,9 +149,8 @@
android:drawablePadding="@dimen/send_and_call_drawable_padding"
android:textAllCaps="true"
android:text="@string/share_and_call"
- android:textSize="@dimen/send_and_call_text_size"
- android:fontFamily="sans-serif-medium"
- android:textColor="?android:attr/colorBackground"/>
+ style="@style/Dialer.TextAppearance.Header2"
+ android:textColor="?android:attr/textColorPrimaryInverse"/>
</FrameLayout>
</FrameLayout>
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 49df9e679..6255e7289 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
@@ -64,7 +64,7 @@
android:paddingBottom="64dp"
android:textSize="@dimen/message_compose_item_text_size"
android:hint="@string/message_composer_custom_message_hint"
- android:textColor="@color/dialer_primary_text_color"
+ android:textColor="?android:attr/textColorPrimary"
android:textColorHint="?android:attr/textColorHint"
android:background="?android:attr/colorBackground"
android:textCursorDrawable="@drawable/searchedittext_custom_cursor"
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 783ba9867..4248046dc 100644
--- a/java/com/android/dialer/callcomposer/res/layout/permission_view.xml
+++ b/java/com/android/dialer/callcomposer/res/layout/permission_view.xml
@@ -33,7 +33,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/permission_item_margin"
- style="@style/TextAppearanceMedium"/>
+ style="@style/Dialer.TextAppearance.Header2"/>
<TextView
android:id="@+id/allow"
diff --git a/java/com/android/dialer/callcomposer/res/values/styles.xml b/java/com/android/dialer/callcomposer/res/values/styles.xml
index aeec2a369..cc0cc9028 100644
--- a/java/com/android/dialer/callcomposer/res/values/styles.xml
+++ b/java/com/android/dialer/callcomposer/res/values/styles.xml
@@ -30,12 +30,10 @@
<item name="android:actionBarItemBackground">@drawable/item_background_material_borderless_dark</item>
</style>
- <style name="message_composer_textview">
- <item name="android:textSize">@dimen/message_compose_item_text_size</item>
- <item name="android:textColor">@color/dialer_primary_text_color</item>
+ <style name="message_composer_textview" parent="Dialer.TextAppearance.Primary">
<item name="android:paddingStart">@dimen/message_composer_item_padding</item>
<item name="android:paddingEnd">@dimen/message_composer_item_padding</item>
- <item name="android:background">@drawable/item_background_material_light</item>
+ <item name="android:background">?android:attr/selectableItemBackground</item>
<item name="android:gravity">center_vertical</item>
</style>
</resources> \ No newline at end of file
diff --git a/java/com/android/dialer/calldetails/AndroidManifest.xml b/java/com/android/dialer/calldetails/AndroidManifest.xml
index 54d9f2fad..cea106a74 100644
--- a/java/com/android/dialer/calldetails/AndroidManifest.xml
+++ b/java/com/android/dialer/calldetails/AndroidManifest.xml
@@ -20,14 +20,12 @@
<activity
android:label="@string/call_details"
android:exported="false"
- android:name="com.android.dialer.calldetails.OldCallDetailsActivity"
- android:theme="@style/Dialer.ThemeBase.NoActionBar">
+ android:name="com.android.dialer.calldetails.OldCallDetailsActivity">
</activity>
<activity
android:label="@string/call_details"
android:exported="false"
- android:name="com.android.dialer.calldetails.CallDetailsActivity"
- android:theme="@style/Dialer.ThemeBase.NoActionBar">
+ android:name="com.android.dialer.calldetails.CallDetailsActivity">
</activity>
</application>
</manifest>
diff --git a/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java b/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java
index 4de7af796..77dad3082 100644
--- a/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java
+++ b/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java
@@ -230,7 +230,7 @@ public class CallDetailsEntryViewHolder extends ViewHolder {
// call history, possibly due to 3rd party call log implementations (e.g. to
// distinguish between rejected and missed calls). Instead of crashing, just
// assume that all unknown call types are missed calls.
- return ContextCompat.getColor(context, R.color.missed_call);
+ return ContextCompat.getColor(context, R.color.dialer_red);
}
}
}
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 40140971e..cb2faa762 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
@@ -36,12 +36,11 @@
android:layout_marginStart="@dimen/call_entry_text_left_margin"
android:layout_marginEnd="16dp"
android:layout_toStartOf="@+id/call_duration"
- android:gravity="start"
- android:maxLines="100"/>
+ android:gravity="start"/>
<TextView
android:id="@+id/call_time"
- style="@style/Dialer.TextAppearance.Secondary"
+ style="@style/Dialer.TextAppearance.Secondary.Ellipsize"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/call_entry_bottom_padding"
@@ -50,7 +49,7 @@
<TextView
android:id="@+id/call_duration"
- style="@style/Dialer.TextAppearance.Primary"
+ style="@style/Dialer.TextAppearance.Primary.Ellipsize"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/call_entry_padding"
@@ -66,7 +65,7 @@
<TextView
android:id="@+id/post_call_note"
- style="@style/Dialer.TextAppearance.Secondary"
+ style="@style/Dialer.TextAppearance.Secondary.Ellipsize"
android:layout_width="match_parent"
android:layout_height="@dimen/ec_container_height"
android:layout_below="@+id/ec_container"
@@ -77,7 +76,7 @@
android:visibility="gone"/>
<TextView
android:id="@+id/rtt_transcript"
- style="@style/Dialer.TextAppearance.Secondary"
+ style="@style/Dialer.TextAppearance.Secondary.Ellipsize"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/call_entry_bottom_padding"
@@ -95,6 +94,6 @@
android:layout_marginBottom="@dimen/ec_divider_top_bottom_margin"
android:layout_marginStart="@dimen/call_entry_text_left_margin"
android:layout_below="@id/rtt_transcript"
- android:background="#12000000"
+ android:background="@color/dialer_divider_line_color"
android:visibility="gone"/>
</RelativeLayout> \ No newline at end of file
diff --git a/java/com/android/dialer/calldetails/res/layout/call_details_footer.xml b/java/com/android/dialer/calldetails/res/layout/call_details_footer.xml
index dddb45156..002903803 100644
--- a/java/com/android/dialer/calldetails/res/layout/call_details_footer.xml
+++ b/java/com/android/dialer/calldetails/res/layout/call_details_footer.xml
@@ -24,7 +24,7 @@
android:layout_height="1dp"
android:layout_marginTop="@dimen/ec_divider_top_bottom_margin"
android:layout_marginBottom="@dimen/ec_divider_top_bottom_margin"
- android:background="#12000000"/>
+ android:background="@color/dialer_divider_line_color"/>
<TextView
android:id="@+id/call_detail_action_copy"
@@ -32,6 +32,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/quantum_ic_content_copy_grey600_24"
+ android:tint="?colorIcon"
android:text="@string/call_details_copy_number"/>
<TextView
@@ -40,6 +41,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/quantum_ic_edit_grey600_24"
+ android:tint="?colorIcon"
android:text="@string/call_details_edit_number"/>
<TextView
@@ -49,6 +51,7 @@
android:layout_height="wrap_content"
android:drawableStart="@drawable/quantum_ic_report_grey600_24"
android:text="@string/call_details_report_call_id"
+ android:tint="?colorIcon"
android:visibility="gone"/>
<TextView
@@ -57,6 +60,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/quantum_ic_delete_vd_theme_24"
- android:tint="@color/dialer_secondary_text_color"
+ android:tint="?colorIcon"
android:text="@string/delete"/>
</LinearLayout>
diff --git a/java/com/android/dialer/calldetails/res/layout/caller_id_report_dialog.xml b/java/com/android/dialer/calldetails/res/layout/caller_id_report_dialog.xml
index 09d3c2b43..0fd163f55 100644
--- a/java/com/android/dialer/calldetails/res/layout/caller_id_report_dialog.xml
+++ b/java/com/android/dialer/calldetails/res/layout/caller_id_report_dialog.xml
@@ -24,12 +24,12 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
- android:textAppearance="?android:attr/textAppearanceMedium"/>
+ android:textAppearance="@style/Dialer.TextAppearance.Header2"/>
<TextView
android:id="@+id/number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
- android:textAppearance="?android:attr/textAppearanceMedium"/>
+ android:textAppearance="@style/Dialer.TextAppearance.Header2"/>
</LinearLayout> \ No newline at end of file
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 e0de8dc5f..e918feb69 100644
--- a/java/com/android/dialer/calldetails/res/layout/contact_container.xml
+++ b/java/com/android/dialer/calldetails/res/layout/contact_container.xml
@@ -53,14 +53,14 @@
<TextView
android:id="@+id/phone_number"
- style="@style/Dialer.TextAppearance.Secondary"
+ style="@style/Dialer.TextAppearance.Secondary.Ellipsize"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/photo_text_margin"/>
<TextView
android:id="@+id/network"
- style="@style/Dialer.TextAppearance.Secondary"
+ style="@style/Dialer.TextAppearance.Secondary.Ellipsize"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/photo_text_margin"
@@ -78,7 +78,7 @@
android:contentDescription="@string/call"
android:scaleType="center"
android:src="@drawable/quantum_ic_call_white_24"
- android:tint="@color/secondary_text_color"/>
+ android:tint="?colorIcon"/>
<RelativeLayout
@@ -97,11 +97,11 @@
android:layout_marginStart="@dimen/ad_icon_margin_start_offset"
android:scaleType="fitCenter"
android:src="@drawable/quantum_ic_language_vd_theme_24"
- android:tint="@color/secondary_text_color"/>
+ android:tint="?colorIcon"/>
<TextView
android:id="@+id/assisted_dialing_text"
- style="@style/Dialer.TextAppearance.Secondary"
+ style="@style/Dialer.TextAppearance.Secondary.Ellipsize"
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 523191207..18a7c283c 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
@@ -29,7 +29,7 @@
android:layout_centerVertical="true"
android:layout_marginStart="1dp"
android:maxLines="2"
- style="@style/Dialer.TextAppearance.Secondary"/>
+ style="@style/Dialer.TextAppearance.Secondary.Ellipsize"/>
<FrameLayout
android:id="@+id/multimedia_image_container"
@@ -54,10 +54,9 @@
android:id="@+id/multimedia_attachments_number"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:textColor="?android:attr/colorBackground"
+ android:textColor="?android:attr/textColorPrimaryInverse"
android:textSize="20sp"
- android:fontFamily="sans-serif-medium"
- android:background="#80000000"
+ style="@style/Dialer.TextAppearance.Header2"
android:gravity="center"
android:visibility="gone"/>
</FrameLayout>
diff --git a/java/com/android/dialer/calldetails/res/values/styles.xml b/java/com/android/dialer/calldetails/res/values/styles.xml
index 1b4329a23..4b861f55b 100644
--- a/java/com/android/dialer/calldetails/res/values/styles.xml
+++ b/java/com/android/dialer/calldetails/res/values/styles.xml
@@ -15,7 +15,7 @@
~ limitations under the License
-->
<resources>
- <style name="CallDetailsActionItemStyle">
+ <style name="CallDetailsActionItemStyle" parent="Dialer.TextAppearance.Secondary.Ellipsize">
<item name="android:foreground">?android:attr/selectableItemBackground</item>
<item name="android:clickable">true</item>
<item name="android:drawablePadding">28dp</item>
@@ -24,8 +24,6 @@
<item name="android:paddingEnd">28dp</item>
<item name="android:paddingTop">16dp</item>
<item name="android:paddingBottom">16dp</item>
- <item name="android:textColor">#8A000000</item>
- <item name="android:textSize">14sp</item>
</style>
<style name="RttTranscriptLink">
@@ -34,6 +32,7 @@
<item name="android:textAllCaps">true</item>
<item name="textAllCaps">true</item>
</style>
+
<style name="RttTranscriptMessage" parent="Dialer.TextAppearance.Secondary">
<item name="android:fontFamily">sans-serif</item>
<item name="android:textAllCaps">false</item>
diff --git a/java/com/android/dialer/calllog/ui/NewCallLogFragment.java b/java/com/android/dialer/calllog/ui/NewCallLogFragment.java
index ec6e8a0fd..4b3697017 100644
--- a/java/com/android/dialer/calllog/ui/NewCallLogFragment.java
+++ b/java/com/android/dialer/calllog/ui/NewCallLogFragment.java
@@ -238,7 +238,6 @@ public final class NewCallLogFragment extends Fragment implements LoaderCallback
private void configureEmptyContentView() {
emptyContentView.setImage(R.drawable.quantum_ic_query_builder_vd_theme_24);
- emptyContentView.setImageTint(R.color.empty_call_log_icon_tint_color, null);
emptyContentView.setDescription(R.string.new_call_log_permission_no_calllog);
emptyContentView.setActionLabel(com.android.dialer.widget.R.string.permission_single_turn_on);
emptyContentView.setActionClickedListener(new TurnOnPhonePermissions());
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 1bd71bb0f..0acd8155f 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,14 +60,12 @@
-->
<TextView
android:id="@+id/primary_text"
- style="@style/Dialer.TextAppearance.Primary"
+ style="@style/Dialer.TextAppearance.Primary.Ellipsize"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginEnd="6dp"
- android:ellipsize="end"
android:lineSpacingMultiplier="1.5"
- android:singleLine="true"
tools:ignore="InefficientWeight"/>
<ImageView
@@ -120,23 +118,19 @@
<TextView
android:id="@+id/secondary_text"
- style="@style/Dialer.TextAppearance.Secondary"
+ style="@style/Dialer.TextAppearance.Secondary.Ellipsize"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:ellipsize="end"
- android:lineSpacingMultiplier="1.4"
- android:singleLine="true"/>
+ android:lineSpacingMultiplier="1.4"/>
</LinearLayout>
<!-- 3rd row: phone account info -->
<TextView
android:id="@+id/phone_account"
- style="@style/Dialer.TextAppearance.Secondary"
+ style="@style/Dialer.TextAppearance.Secondary.Ellipsize"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:singleLine="true"/>
+ android:layout_height="wrap_content"/>
</LinearLayout>
@@ -150,5 +144,5 @@
android:contentDescription="@string/a11y_new_call_log_expand_menu_for_entry"
android:scaleType="center"
android:src="@drawable/quantum_ic_more_vert_vd_theme_24"
- android:tint="@color/dialer_secondary_text_color"/>
+ android:tint="?colorIcon"/>
</RelativeLayout>
diff --git a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_header.xml b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_header.xml
index e86ece534..a6d1f61f1 100644
--- a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_header.xml
+++ b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_header.xml
@@ -21,7 +21,7 @@
android:layout_height="wrap_content">
<TextView
android:id="@+id/new_call_log_header_text"
- style="@style/SubHeader"
+ style="@style/Dialer.TextAppearance.Secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
diff --git a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_promotion_card.xml b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_promotion_card.xml
index 0e6d551fb..fade6c7b9 100644
--- a/java/com/android/dialer/calllog/ui/res/layout/new_call_log_promotion_card.xml
+++ b/java/com/android/dialer/calllog/ui/res/layout/new_call_log_promotion_card.xml
@@ -49,17 +49,14 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
- android:fontFamily="sans-serif-medium"
- android:textColor="@color/primary_material_dark"
- android:textSize="@dimen/call_log_primary_text_size"/>
+ style="@style/Dialer.TextAppearance.Header2"/>
<TextView
android:id="@+id/new_call_log_promotion_card_details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:lineSpacingExtra="8dp"
- android:textColor="@color/primary_material_dark"
- android:textSize="14sp"/>
+ style="@style/Dialer.TextAppearance.Secondary"/>
<Button
android:id="@+id/new_call_log_promotion_card_ok"
android:layout_width="wrap_content"
diff --git a/java/com/android/dialer/calllog/ui/res/values/colors.xml b/java/com/android/dialer/calllog/ui/res/values/colors.xml
index 002aaf959..27a821e10 100644
--- a/java/com/android/dialer/calllog/ui/res/values/colors.xml
+++ b/java/com/android/dialer/calllog/ui/res/values/colors.xml
@@ -16,11 +16,10 @@
-->
<resources>
+ <!-- TODO(a bug): remove these? -->
<color name="feature_icon_read_color">#9E9E9E</color>
<color name="feature_icon_unread_color">#474747</color>
<color name="call_type_icon_read_color">#757575</color>
<color name="call_type_icon_unread_color">#D32F2F</color>
-
- <color name="empty_call_log_icon_tint_color">#E1E1E1</color>
</resources> \ No newline at end of file
diff --git a/java/com/android/dialer/calllog/ui/res/values/strings.xml b/java/com/android/dialer/calllog/ui/res/values/strings.xml
index 3888eb90d..3f6462c7b 100644
--- a/java/com/android/dialer/calllog/ui/res/values/strings.xml
+++ b/java/com/android/dialer/calllog/ui/res/values/strings.xml
@@ -32,6 +32,7 @@
<!-- Header in call log to group calls from before yesterday. [CHAR LIMIT=30] -->
<string name="new_call_log_header_older">Older</string>
+
<!-- Shown as a prompt to turn on the phone permission to enable the call log [CHAR LIMIT=NONE]-->
<string name="new_call_log_permission_no_calllog">To see your call log, turn on the Phone permission.</string>
diff --git a/java/com/android/dialer/calllog/ui/res/values/styles.xml b/java/com/android/dialer/calllog/ui/res/values/styles.xml
index 047f1dace..3a02eb23f 100644
--- a/java/com/android/dialer/calllog/ui/res/values/styles.xml
+++ b/java/com/android/dialer/calllog/ui/res/values/styles.xml
@@ -16,32 +16,19 @@
-->
<resources>
- <style name="primary_textview">
- <item name="android:textColor">@color/primary_text_color</item>
- <item name="android:fontFamily">sans-serif</item>
- </style>
+ <style name="primary_textview" parent="Dialer.TextAppearance.Primary"/>
- <style name="primary_textview_unread_call">
- <item name="android:textColor">@color/primary_text_color</item>
- <item name="android:fontFamily">sans-serif-medium</item>
- </style>
+ <style name="primary_textview_unread_call" parent="Dialer.TextAppearance.Header2"/>
- <style name="secondary_textview">
- <item name="android:textColor">@color/secondary_text_color</item>
- <item name="android:fontFamily">sans-serif</item>
- </style>
+ <style name="secondary_textview" parent="Dialer.TextAppearance.Secondary"/>
- <style name="phoneaccount_textview">
- <item name="android:fontFamily">sans-serif</item>
- </style>
+ <style name="phoneaccount_textview"/>
- <style name="secondary_textview_unread_call">
- <item name="android:textColor">@color/missed_call</item>
- <item name="android:fontFamily">sans-serif-medium</item>
+ <style name="secondary_textview_unread_call" parent="Dialer.TextAppearance.Header2">
+ <item name="android:textColor">@color/dialer_red</item>
</style>
<style name="phoneaccount_textview_unread_call">
<item name="android:fontFamily">sans-serif-medium</item>
</style>
-
</resources> \ No newline at end of file
diff --git a/java/com/android/dialer/calllogutils/CallTypeIconsView.java b/java/com/android/dialer/calllogutils/CallTypeIconsView.java
index 30d9b6178..1df615f9c 100644
--- a/java/com/android/dialer/calllogutils/CallTypeIconsView.java
+++ b/java/com/android/dialer/calllogutils/CallTypeIconsView.java
@@ -27,7 +27,7 @@ import android.support.annotation.VisibleForTesting;
import android.util.AttributeSet;
import android.view.View;
import com.android.dialer.compat.AppCompatConstants;
-import com.android.dialer.theme.ThemeUtil;
+import com.android.dialer.theme.base.ThemeUtil;
import java.util.ArrayList;
import java.util.List;
@@ -289,20 +289,20 @@ public class CallTypeIconsView extends View {
int iconId = R.drawable.quantum_ic_call_received_white_24;
Drawable drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId);
incoming = drawable.mutate();
- incoming.setColorFilter(r.getColor(R.color.answered_call), PorterDuff.Mode.MULTIPLY);
+ incoming.setColorFilter(r.getColor(R.color.dialer_call_green), PorterDuff.Mode.MULTIPLY);
// Create a rotated instance of the call arrow for outgoing calls.
iconId = R.drawable.quantum_ic_call_made_white_24;
drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId);
outgoing = drawable.mutate();
- outgoing.setColorFilter(r.getColor(R.color.answered_call), PorterDuff.Mode.MULTIPLY);
+ outgoing.setColorFilter(r.getColor(R.color.dialer_call_green), PorterDuff.Mode.MULTIPLY);
// Need to make a copy of the arrow drawable, otherwise the same instance colored
// above will be recolored here.
iconId = R.drawable.quantum_ic_call_missed_white_24;
drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId);
missed = drawable.mutate();
- missed.setColorFilter(r.getColor(R.color.missed_call), PorterDuff.Mode.MULTIPLY);
+ missed.setColorFilter(r.getColor(R.color.dialer_red), PorterDuff.Mode.MULTIPLY);
iconId = R.drawable.quantum_ic_voicemail_white_24;
drawable = largeIcons ? r.getDrawable(iconId) : getScaledBitmap(context, iconId);
diff --git a/java/com/android/dialer/calllogutils/res/values/colors.xml b/java/com/android/dialer/calllogutils/res/values/colors.xml
index 8662163c1..3a9e3ae8a 100644
--- a/java/com/android/dialer/calllogutils/res/values/colors.xml
+++ b/java/com/android/dialer/calllogutils/res/values/colors.xml
@@ -15,8 +15,4 @@
~ limitations under the License
-->
<resources>
- <!-- Color for missed call icons. -->
- <color name="missed_call">#C53929</color>
- <!-- Color for answered or outgoing call icons. -->
- <color name="answered_call">#00c853</color>
</resources> \ No newline at end of file
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 4683616e8..b4bc00a0d 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
@@ -24,7 +24,7 @@
</item>
<item>
<shape android:shape="rectangle">
- <solid android:color="@color/dialer_secondary_text_color"/>
+ <solid android:color="?android:attr/textColorSecondary"/>
<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 bc5f712f0..be4ee0853 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
@@ -44,7 +44,6 @@
android:paddingStart="@dimen/text_padding_start"
android:paddingEnd="@dimen/text_padding_end"
android:gravity="center_vertical"
- android:fontFamily="sans-serif"
android:text="@string/all_contacts_empty_add_contact_action"
style="@style/Dialer.TextAppearance.Primary"/>
</LinearLayout>
diff --git a/java/com/android/dialer/contactsfragment/res/layout/contact_row.xml b/java/com/android/dialer/contactsfragment/res/layout/contact_row.xml
index b65a8c87f..3309ab474 100644
--- a/java/com/android/dialer/contactsfragment/res/layout/contact_row.xml
+++ b/java/com/android/dialer/contactsfragment/res/layout/contact_row.xml
@@ -51,7 +51,7 @@
android:ellipsize="end"
android:gravity="center_vertical"
android:textSize="@dimen/text_size"
- android:textColor="@color/dialer_primary_text_color"
+ android:textColor="?android:attr/textColorPrimary"
android:fontFamily="sans-serif"/>
</LinearLayout>
</FrameLayout> \ No newline at end of file
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 8d04fe512..fa17bf9e7 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="?android:attr/colorBackgroundFloating"
+ android:background="?android:attr/colorBackground"
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="?android:attr/colorBackground"
+ android:textColor="?android:attr/textColorPrimaryInverse"
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 e75c7dc5a..c0ba9d7f1 100644
--- a/java/com/android/dialer/contactsfragment/res/layout/header.xml
+++ b/java/com/android/dialer/contactsfragment/res/layout/header.xml
@@ -21,6 +21,5 @@
android:layout_height="@dimen/row_height"
android:textColor="?android:attr/colorPrimary"
android:gravity="center"
- android:textSize="@dimen/text_size"
android:textStyle="bold"
- android:fontFamily="sans-serif-medium"/> \ No newline at end of file
+ style="@style/Dialer.TextAppearance.Header2"/> \ No newline at end of file
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 7f82d74fe..66013c64c 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
@@ -76,7 +76,7 @@
android:contentDescription="@string/description_dial_button"
android:src="@drawable/quantum_ic_call_white_24"
android:visibility="invisible"
- app:backgroundTint="@color/dialpad_fab_green"
+ app:backgroundTint="@color/dialer_call_green"
app:elevation="@dimen/floating_action_button_translation_z"/>
</RelativeLayout>
</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 d3ebeb06c..3497d2ab5 100644
--- a/java/com/android/dialer/dialpadview/res/layout/dialpad_fragment.xml
+++ b/java/com/android/dialer/dialpadview/res/layout/dialpad_fragment.xml
@@ -66,9 +66,9 @@
android:layout_centerHorizontal="true"
android:contentDescription="@string/description_dial_button"
android:src="@drawable/quantum_ic_call_vd_theme_24"
- android:tint="#ffffff"
+ android:tint="?colorIconOnUnthemedDarkBackground"
android:visibility="invisible"
- app:backgroundTint="@color/dialpad_fab_green"
- app:colorControlNormal="#ffffff"
+ app:backgroundTint="@color/dialer_call_green"
+ app:colorControlNormal="?colorIconOnUnthemedDarkBackground"
app:elevation="@dimen/floating_action_button_translation_z"/>
</view>
diff --git a/java/com/android/dialer/dialpadview/res/layout/dialpad_view_unthemed.xml b/java/com/android/dialer/dialpadview/res/layout/dialpad_view_unthemed.xml
index 69d23a9b6..9953fa3b4 100644
--- a/java/com/android/dialer/dialpadview/res/layout/dialpad_view_unthemed.xml
+++ b/java/com/android/dialer/dialpadview/res/layout/dialpad_view_unthemed.xml
@@ -81,7 +81,7 @@
android:contentDescription="@string/description_dialpad_back"
android:gravity="center"
android:src="@drawable/quantum_ic_close_white_24"
- android:tint="?attr/dialpad_icon_tint"
+ android:tint="?colorIcon"
android:tintMode="src_in"
android:visibility="gone"/>
@@ -96,7 +96,7 @@
android:contentDescription="@string/description_dialpad_overflow"
android:gravity="center"
android:src="@drawable/quantum_ic_more_vert_white_24"
- android:tint="?attr/dialpad_icon_tint"
+ android:tint="?colorIcon"
android:tintMode="src_in"
android:visibility="gone"/>
<FrameLayout android:layout_width="0dp"
@@ -108,7 +108,7 @@
android:focusable="false"
android:gravity="center"
android:textSize="14sp"
- android:textColor="@color/secondary_text_color"
+ android:textColor="?colorIcon"
android:visibility="gone"
/>
<com.android.dialer.dialpadview.DigitsEditText
@@ -142,7 +142,7 @@
android:contentDescription="@string/description_delete_button"
android:src="@drawable/quantum_ic_backspace_white_24"
android:state_enabled="false"
- android:tint="?attr/dialpad_icon_tint"
+ android:tint="?colorIcon"
android:tintMode="src_in"/>
</LinearLayout>
diff --git a/java/com/android/dialer/dialpadview/theme/res/values/attr.xml b/java/com/android/dialer/dialpadview/theme/res/values/attr.xml
index 99707aa1d..9cd225ad2 100644
--- a/java/com/android/dialer/dialpadview/theme/res/values/attr.xml
+++ b/java/com/android/dialer/dialpadview/theme/res/values/attr.xml
@@ -32,8 +32,6 @@
<attr format="color" name="dialpad_text_color"/>
<attr format="color" name="dialpad_text_color_primary"/>
<attr format="color" name="dialpad_text_color_secondary"/>
- <attr format="color" name="dialpad_icon_tint"/>
- <attr format="color" name="dialpad_voicemail_tint"/>
<attr format="color" name="dialpad_background"/>
<attr format="dimension" name="dialpad_elevation"/>
</declare-styleable>
diff --git a/java/com/android/dialer/dialpadview/theme/res/values/styles.xml b/java/com/android/dialer/dialpadview/theme/res/values/styles.xml
index 408a33dd1..04ebb1b13 100644
--- a/java/com/android/dialer/dialpadview/theme/res/values/styles.xml
+++ b/java/com/android/dialer/dialpadview/theme/res/values/styles.xml
@@ -36,16 +36,6 @@
<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 e5e5a42e9..35dc531d8 100644
--- a/java/com/android/dialer/enrichedcall/simulator/AndroidManifest.xml
+++ b/java/com/android/dialer/enrichedcall/simulator/AndroidManifest.xml
@@ -19,8 +19,7 @@
<application>
<activity
android:label="@string/enriched_call_simulator_activity"
- android:name="com.android.dialer.enrichedcall.simulator.EnrichedCallSimulatorActivity"
- android:theme="@style/Dialer.ThemeBase.NoActionBar">
+ android:name="com.android.dialer.enrichedcall.simulator.EnrichedCallSimulatorActivity">
</activity>
</application>
</manifest>
diff --git a/java/com/android/dialer/historyitemactions/HistoryItemActionBottomSheet.java b/java/com/android/dialer/historyitemactions/HistoryItemActionBottomSheet.java
index e3e9e7a64..206a2d3d0 100644
--- a/java/com/android/dialer/historyitemactions/HistoryItemActionBottomSheet.java
+++ b/java/com/android/dialer/historyitemactions/HistoryItemActionBottomSheet.java
@@ -23,7 +23,6 @@ import android.support.annotation.NonNull;
import android.support.design.widget.BottomSheetBehavior;
import android.support.design.widget.BottomSheetBehavior.BottomSheetCallback;
import android.support.design.widget.BottomSheetDialog;
-import android.support.v4.content.ContextCompat;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
@@ -34,6 +33,7 @@ import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.android.dialer.common.Assert;
+import com.android.dialer.theme.base.ThemeUtil;
import com.android.dialer.widget.ContactPhotoView;
import java.util.List;
@@ -156,9 +156,7 @@ public class HistoryItemActionBottomSheet extends BottomSheetDialog implements O
.setImageResource(module.getDrawableId());
if (module.tintDrawable()) {
((ImageView) moduleView.findViewById(R.id.module_image))
- .setImageTintList(
- ColorStateList.valueOf(
- ContextCompat.getColor(getContext(), R.color.secondary_text_color)));
+ .setImageTintList(ColorStateList.valueOf(ThemeUtil.getColorIcon()));
}
moduleView.setOnClickListener(this);
moduleView.setTag(module);
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 5fe40939e..afda32722 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/Dialer.TextAppearance.Primary"
+ style="@style/Dialer.TextAppearance.Primary.Ellipsize"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/secondary_text"
- style="@style/Dialer.TextAppearance.Secondary"
+ style="@style/Dialer.TextAppearance.Secondary.Ellipsize"
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 6b54e5e8b..f89ed82dc 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/Dialer.TextAppearance.Primary"/>
+ style="@style/Dialer.TextAppearance.Primary.Ellipsize"/>
</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 98e2ec999..ed5c18638 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">?android:attr/colorBackground</item>
+ <item name="android:navigationBarColor">?android:attr/colorBackgroundFloating</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 12ba12b6c..edfc42f91 100644
--- a/java/com/android/dialer/inject/ContextModule.java
+++ b/java/com/android/dialer/inject/ContextModule.java
@@ -18,7 +18,7 @@ package com.android.dialer.inject;
import android.content.Context;
import android.support.annotation.NonNull;
-import com.android.dialer.theme.ThemeUtil;
+import com.android.dialer.theme.base.ThemeUtil;
import dagger.Module;
import dagger.Provides;
diff --git a/java/com/android/dialer/main/impl/OldMainActivityPeer.java b/java/com/android/dialer/main/impl/OldMainActivityPeer.java
index a0e92a8cb..62ad5b599 100644
--- a/java/com/android/dialer/main/impl/OldMainActivityPeer.java
+++ b/java/com/android/dialer/main/impl/OldMainActivityPeer.java
@@ -116,6 +116,8 @@ import com.android.dialer.smartdial.util.SmartDialPrefix;
import com.android.dialer.speeddial.SpeedDialFragment;
import com.android.dialer.storage.StorageComponent;
import com.android.dialer.telecom.TelecomUtil;
+import com.android.dialer.theme.base.ThemeUtil;
+import com.android.dialer.theme.base.ThemeUtil.Theme;
import com.android.dialer.util.DialerUtils;
import com.android.dialer.util.PermissionsUtil;
import com.android.dialer.util.TransactionSafeActivity;
@@ -229,12 +231,29 @@ public class OldMainActivityPeer implements MainActivityPeer, FragmentUtilListen
@Override
public void onActivityCreate(Bundle savedInstanceState) {
LogUtil.enterBlock("OldMainActivityPeer.onActivityCreate");
+ setTheme();
activity.setContentView(R.layout.main_activity);
initUiListeners();
initLayout(savedInstanceState);
SmartDialPrefix.initializeNanpSettings(activity);
}
+ /** should be called before {@link AppCompatActivity#setContentView(int)}. */
+ private void setTheme() {
+ @Theme int theme = ThemeUtil.getTheme();
+ switch (theme) {
+ case ThemeUtil.DARK:
+ activity.setTheme(R.style.MainActivityTheme_Dark);
+ break;
+ case ThemeUtil.LIGHT:
+ activity.setTheme(R.style.MainActivityTheme);
+ break;
+ case ThemeUtil.UNKNOWN:
+ default:
+ throw new IllegalArgumentException("Invalid theme.");
+ }
+ }
+
private void initUiListeners() {
getLastOutgoingCallListener =
DialerExecutorComponent.get(activity)
diff --git a/java/com/android/dialer/main/impl/bottomnav/BottomNavItem.java b/java/com/android/dialer/main/impl/bottomnav/BottomNavItem.java
index 4edb08e55..dec6350ae 100644
--- a/java/com/android/dialer/main/impl/bottomnav/BottomNavItem.java
+++ b/java/com/android/dialer/main/impl/bottomnav/BottomNavItem.java
@@ -30,7 +30,7 @@ import android.widget.LinearLayout;
import android.widget.TextView;
import com.android.dialer.common.Assert;
import com.android.dialer.configprovider.ConfigProviderBindings;
-import com.android.dialer.theme.ThemeUtil;
+import com.android.dialer.theme.base.ThemeUtil;
/** Navigation item in a bottom nav. */
final class BottomNavItem extends LinearLayout {
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 dad566b68..65bc8f9b4 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
@@ -19,5 +19,5 @@
android:shape="rectangle">
<solid android:color="?android:attr/colorPrimary"/>
<corners android:radius="20dp"/>
- <stroke android:color="?android:attr/colorBackground" android:width="2dp"/>
+ <stroke android:color="?android:attr/colorBackgroundFloating" android:width="2dp"/>
</shape> \ No newline at end of file
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 2197b4d21..3fbd9ffc9 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
@@ -58,7 +58,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
- android:textSize="12sp"
- android:textColor="?android:attr/colorPrimary"
- android:gravity="center_horizontal"/>
+ android:gravity="center_horizontal"
+ style="@style/Dialer.TextAppearance.Secondary"/>
</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 709de52b8..0edc03c3d 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
@@ -47,9 +47,7 @@
android:id="@+id/promotion_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:fontFamily="sans-serif-medium"
- android:textColor="#DD000000"
- android:textSize="16sp"
+ style="@style/Dialer.TextAppearance.Header2"
/>
<TextView
android:id="@+id/promotion_details"
@@ -58,8 +56,7 @@
android:layout_marginTop="8dp"
android:layout_marginBottom="16dp"
android:lineSpacingMultiplier="1.5"
- android:textColor="#DD000000"
- android:textSize="14sp"/>
+ style="@style/Dialer.TextAppearance.Secondary"/>
<Button
android:id="@+id/ok_got_it"
android:layout_width="wrap_content"
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 9462bbc25..261012ed5 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
@@ -24,4 +24,13 @@
<item name="android:navigationBarColor">?android:attr/colorBackgroundFloating</item>
<item name="android:navigationBarDividerColor">#E0E0E0</item>
</style>
+
+ <!-- Used on sdk 27 and above -->
+ <!-- TODO(a bug): refactor into dialer/theme -->
+ <style name="MainActivityTheme.Dark" parent="MainActivityThemeBase.Dark">
+ <!-- Used to change the navigation bar color -->
+ <item name="android:windowLightNavigationBar">true</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/styles.xml b/java/com/android/dialer/main/impl/res/values/styles.xml
index 467cb5be0..7b36e78ef 100644
--- a/java/com/android/dialer/main/impl/res/values/styles.xml
+++ b/java/com/android/dialer/main/impl/res/values/styles.xml
@@ -19,12 +19,23 @@
<!-- Activities should use this theme as their style -->
<style name="MainActivityTheme" parent="MainActivityThemeBase"/>
+ <style name="MainActivityTheme.Dark" parent="MainActivityTheme.Dark"/>
+
<!-- Used as a procy for values-v27/styles.xml -->
<style name="MainActivityThemeBase" parent="Dialer.ThemeBase.NoActionBar">
<!-- Required for actionmode/multiselect to render properly. -->
<!-- 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>
+ <item name="dialpad_style">@style/Dialpad.Light</item>
+ </style>
+
+ <style name="MainActivityThemeBase.Dark" parent="Dialer.Dark.ThemeBase.NoActionBar">
+ <!-- Required for actionmode/multiselect to render properly. -->
+ <!-- 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>
+ <item name="dialpad_style">@style/Dialpad.Light</item>
</style>
<!-- Colors our actionbar in action mode to dialer theme color. -->
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 8bc21c4a8..b797bd171 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="?android:attr/colorBackground"/>
+ <solid android:color="?android:attr/colorBackgroundFloating"/>
</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 2bbc8d106..88f5a04ca 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="?android:attr/colorBackground"/>
+ <solid android:color="?android:attr/colorBackgroundFloating"/>
<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 8a8730f78..e5b72f233 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
@@ -45,7 +45,7 @@
android:inputType="textFilter"
android:maxLines="1"
android:hint="@string/dialer_hint_find_contact"
- android:textColor="@color/dialer_secondary_text_color"
+ android:textColor="?android:attr/textColorSecondary"
android:textColorHint="?android:attr/textColorHint"
android:textCursorDrawable="@drawable/custom_cursor"
android:textSize="16sp"/>
@@ -60,6 +60,6 @@
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/description_clear_search"
android:src="@drawable/quantum_ic_close_vd_theme_24"
- android:tint="@color/dialer_secondary_text_color"
+ android:tint="?colorIcon"
android:visibility="gone"/>
</RelativeLayout> \ No newline at end of file
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 98b856361..578684ef8 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
@@ -50,7 +50,7 @@
android:importantForAccessibility="no"
android:scaleType="center"
android:src="@drawable/quantum_ic_search_vd_theme_24"
- android:tint="@color/dialer_secondary_text_color"/>
+ android:tint="?colorIcon"/>
<TextView
android:id="@+id/search_box_start_search"
@@ -60,9 +60,8 @@
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/search_magnifying_glass"
android:layout_toStartOf="@+id/voice_search_button"
- android:fontFamily="sans-serif"
android:text="@string/dialer_hint_find_contact"
- android:textColor="@color/dialer_secondary_text_color"
+ android:textColor="?android:attr/textColorHint"
android:textSize="16dp"/>
<ImageView
@@ -74,7 +73,7 @@
android:contentDescription="@string/description_start_voice_search"
android:scaleType="center"
android:src="@drawable/quantum_ic_mic_vd_theme_24"
- android:tint="@color/dialer_secondary_text_color"/>
+ android:tint="?colorIcon"/>
<ImageButton
android:id="@+id/main_options_menu_button"
@@ -85,7 +84,7 @@
android:contentDescription="@string/action_menu_overflow_description"
android:scaleType="center"
android:src="@drawable/quantum_ic_more_vert_vd_theme_24"
- android:tint="@color/dialer_secondary_text_color"/>
+ android:tint="?colorIcon"/>
</RelativeLayout>
<include layout="@layout/expanded_search_bar"/>
@@ -122,14 +121,14 @@
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:src="@drawable/quantum_ic_close_vd_theme_24"
- android:tint="?android:attr/textColorPrimaryInverse"/>
+ android:tint="?colorIconOnUnthemedDarkBackground"/>
<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="?android:attr/textColorPrimaryInverse"
+ android:textColor="?colorTextOnUnthemedDarkBackground"
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 82101a0b3..247b6e6e7 100644
--- a/java/com/android/dialer/postcall/AndroidManifest.xml
+++ b/java/com/android/dialer/postcall/AndroidManifest.xml
@@ -21,7 +21,6 @@
<activity
android:name="com.android.dialer.postcall.PostCallActivity"
android:exported="false"
- android:theme="@style/Dialer.ThemeBase.NoActionBar"
android:windowSoftInputMode="adjustResize"/>
</application>
</manifest>
diff --git a/java/com/android/dialer/rtt/AndroidManifest.xml b/java/com/android/dialer/rtt/AndroidManifest.xml
index ecc4fe1bc..f8e8e0b49 100644
--- a/java/com/android/dialer/rtt/AndroidManifest.xml
+++ b/java/com/android/dialer/rtt/AndroidManifest.xml
@@ -16,7 +16,6 @@
<manifest package="com.android.dialer.rtt"
xmlns:android="http://schemas.android.com/apk/res/android">
<application>
- <!-- TODO(a bug): remove the theme here. Needed for espresso test. -->
- <activity android:name=".RttTranscriptActivity" android:theme="@style/Dialer.ThemeBase"/>
+ <activity android:name=".RttTranscriptActivity"/>
</application>
</manifest> \ No newline at end of file
diff --git a/java/com/android/dialer/rtt/res/color/bubble_background.xml b/java/com/android/dialer/rtt/res/color/bubble_background.xml
index fb29ab6c5..9a0840161 100644
--- a/java/com/android/dialer/rtt/res/color/bubble_background.xml
+++ b/java/com/android/dialer/rtt/res/color/bubble_background.xml
@@ -16,6 +16,6 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false"
- android:color="@android:color/white" />
+ android:color="?android:attr/colorBackgroundFloating" />
<item android:color="@color/rtt_transcript_primary_color" />
</selector> \ No newline at end of file
diff --git a/java/com/android/dialer/rtt/res/drawable/message_bubble.xml b/java/com/android/dialer/rtt/res/drawable/message_bubble.xml
index 2b01f62f9..31044b64e 100644
--- a/java/com/android/dialer/rtt/res/drawable/message_bubble.xml
+++ b/java/com/android/dialer/rtt/res/drawable/message_bubble.xml
@@ -16,6 +16,6 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
- <solid android:color="@android:color/white"/>
+ <solid android:color="?android:attr/colorBackgroundFloating"/>
<corners android:radius="20dp"/>
</shape> \ 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 fb6f66c39..4f8e305fe 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
@@ -62,7 +62,7 @@
android:layout_height="@dimen/search_row_height"
android:layout_alignParentEnd="true"
android:padding="@dimen/call_to_action_padding"
- android:tint="@color/dialer_secondary_text_color"
+ android:tint="?colorIcon"
android:visibility="gone"
android:scaleType="center"/>
@@ -74,6 +74,7 @@
android:layout_centerVertical="true"
android:padding="@dimen/call_to_action_padding"
android:src="@drawable/ic_work_profile"
+ android:tint="?colorIcon"
android:scaleType="centerInside"
android:visibility="gone"/>
</RelativeLayout> \ No newline at end of file
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 ad6151bbe..30370674c 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="?android:attr/colorBackgroundFloating"/>
+ android:background="?android:attr/colorBackground"/>
<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="?android:attr/colorBackgroundFloating"/>
+ android:background="?android:attr/colorBackground"/>
</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 b22ddd9a0..ff59206ad 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/Dialer.TextAppearance.Secondary"/>
+ style="@style/Dialer.TextAppearance.Secondary.Ellipsize"/>
</FrameLayout>
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 a79e5883c..41ffb4517 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
@@ -47,8 +47,7 @@
android:minHeight="40dp"
android:text="@string/search_location_permission"
android:lineSpacingMultiplier="1.2"
- android:textSize="16sp"
- android:textColor="@color/dialer_secondary_text_color"/>
+ style="@style/Dialer.TextAppearance.Primary"/>
<Button
android:id="@+id/location_permission_allow"
diff --git a/java/com/android/dialer/shortcuts/res/drawable/ic_add_contact_foreground.xml b/java/com/android/dialer/shortcuts/res/drawable/ic_add_contact_foreground.xml
index 6bc172767..2baa051dd 100644
--- a/java/com/android/dialer/shortcuts/res/drawable/ic_add_contact_foreground.xml
+++ b/java/com/android/dialer/shortcuts/res/drawable/ic_add_contact_foreground.xml
@@ -18,6 +18,5 @@
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:gravity="center"
android:src="@drawable/quantum_ic_person_add_white_24"
- android:tint="@color/shortcut_add_contact_foreground_color">
-
+ android:tint="?android:attr/colorPrimary">
</bitmap>
diff --git a/java/com/android/dialer/shortcuts/res/drawable/ic_shortcut_add_contact.xml b/java/com/android/dialer/shortcuts/res/drawable/ic_shortcut_add_contact.xml
index c06aec82f..59dc466c1 100644
--- a/java/com/android/dialer/shortcuts/res/drawable/ic_shortcut_add_contact.xml
+++ b/java/com/android/dialer/shortcuts/res/drawable/ic_shortcut_add_contact.xml
@@ -24,7 +24,7 @@
<size
android:height="44dp"
android:width="44dp"/>
- <solid android:color="@color/shortcut_add_contact_background_color"/>
+ <solid android:color="?android:attr/colorBackgroundFloating"/>
</shape>
</item>
@@ -34,6 +34,6 @@
android:right="14dp"
android:top="12dp">
<bitmap android:src="@drawable/quantum_ic_person_add_white_24"
- android:tint="@color/shortcut_add_contact_foreground_color"/>
+ android:tint="?android:attr/colorPrimary"/>
</item>
</layer-list>
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
deleted file mode 100644
index 2b36457fc..000000000
--- a/java/com/android/dialer/speeddial/res/drawable/context_menu_background.xml
+++ /dev/null
@@ -1,26 +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
- -->
-
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
- <corners
- android:bottomRightRadius="@dimen/speed_dial_context_menu_corner_radius"
- 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="?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/context_menu_contact_icon.xml b/java/com/android/dialer/speeddial/res/drawable/context_menu_contact_icon.xml
index 73260b156..ee9cde1db 100644
--- a/java/com/android/dialer/speeddial/res/drawable/context_menu_contact_icon.xml
+++ b/java/com/android/dialer/speeddial/res/drawable/context_menu_contact_icon.xml
@@ -18,7 +18,7 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
- <solid android:color="@color/secondary_text_color"/>
+ <solid android:color="?colorIcon"/>
<size android:width="24dp" android:height="24dp"/>
</shape>
</item>
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 e395d4bd6..0923c5267 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
@@ -32,7 +32,7 @@
android:elevation="1dp"
android:text="@string/speed_dial_disambig_dialog_title"
android:background="?android:attr/colorBackgroundFloating"
- style="@style/Dialer.TextAppearance.Header"/>
+ style="@style/Dialer.TextAppearance.Header2"/>
<com.android.dialer.widget.MaxHeightScrollView
android:id="@+id/disambig_scrollview"
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 57f8885ff..e289bb794 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="?android:attr/colorBackgroundFloating"
+ android:background="?android:attr/colorBackground"
android:paddingBottom="@dimen/floating_action_button_list_bottom_padding"/>
<com.android.dialer.widget.EmptyContentView
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 96532fb82..4e010c279 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
@@ -57,7 +57,7 @@
android:layout_centerVertical="true"
android:layout_alignParentEnd="true"
android:scaleType="center"
- android:tint="@color/secondary_text_color"
+ android:tint="?colorIcon"
android:src="@drawable/quantum_ic_more_vert_white_24"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/content_description_overflow"/>
diff --git a/java/com/android/dialer/speeddial/res/menu/starred_contact_context_menu.xml b/java/com/android/dialer/speeddial/res/menu/starred_contact_context_menu.xml
index 0143498e1..2ff2524e6 100644
--- a/java/com/android/dialer/speeddial/res/menu/starred_contact_context_menu.xml
+++ b/java/com/android/dialer/speeddial/res/menu/starred_contact_context_menu.xml
@@ -24,25 +24,25 @@
android:id="@+id/voice_call_container"
android:title="@string/contact_menu_voice_call"
android:icon="@drawable/quantum_ic_phone_vd_theme_24"
- android:iconTint="@color/secondary_text_color"/>
+ android:iconTint="?colorIcon"/>
<item
android:id="@+id/video_call_container"
android:title="@string/contact_menu_video_call"
android:icon="@drawable/quantum_ic_videocam_vd_theme_24"
- android:iconTint="@color/secondary_text_color"/>
+ android:iconTint="?colorIcon"/>
<item
android:id="@+id/send_message_container"
android:title="@string/contact_menu_message"
android:icon="@drawable/quantum_ic_message_vd_theme_24"
- android:iconTint="@color/secondary_text_color"/>
+ android:iconTint="?colorIcon"/>
<item
android:id="@+id/remove_container"
android:title="@string/contact_menu_remove"
android:icon="@drawable/quantum_ic_close_vd_theme_24"
- android:iconTint="@color/secondary_text_color"/>
+ android:iconTint="?colorIcon"/>
<item
android:id="@+id/contact_info_container"
diff --git a/java/com/android/dialer/speeddial/res/values/styles.xml b/java/com/android/dialer/speeddial/res/values/styles.xml
index 38f31c3ed..99e6e3c73 100644
--- a/java/com/android/dialer/speeddial/res/values/styles.xml
+++ b/java/com/android/dialer/speeddial/res/values/styles.xml
@@ -16,7 +16,7 @@
-->
<resources>
<style name="SpeedDialContextMenuItem" parent="SpeedDialContextMenuItem.NoDrawableTint">
- <item name="android:drawableTint">@color/secondary_text_color</item>
+ <item name="android:drawableTint">?colorIcon</item>
</style>
<style name="SpeedDialContextMenuItem.NoDrawableTint" parent="Dialer.TextAppearance.Secondary">
diff --git a/java/com/android/dialer/theme/AndroidManifest.xml b/java/com/android/dialer/theme/AndroidManifest.xml
deleted file mode 100644
index 7c1e4effd..000000000
--- a/java/com/android/dialer/theme/AndroidManifest.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<manifest
- package="com.android.dialer.theme">
-</manifest>
diff --git a/java/com/android/dialer/theme/README.md b/java/com/android/dialer/theme/README.md
new file mode 100644
index 000000000..6fb8e4f07
--- /dev/null
+++ b/java/com/android/dialer/theme/README.md
@@ -0,0 +1,75 @@
+# How to use this directory
+
+First thing to note, it's imperative that the application and all activities
+inherit from the styles outlined in theme/base. If an Activity doesn\'t specify
+a style for it's theme, it automatically inherits one from the Application. And
+this hierarchy continues: Application > Activity > Fragment > View > View > ...
+
+## theme/base
+
+This is where the base application themes, activity themes and application wide
+style attributes live.
+
+What is an attribute? There are three types (depending on how you want to define
+them):
+
+* Legacy Android attributes (android:colorPrimary). These are defined by the
+ Android framework and they exist to allow developers easily custom Android
+ provided widgets.
+
+* Appcompat Android attributes (colorPrimary). There are also defined by the
+ Android framework but they only exist to customize AppCompat widgets. After
+ the framework was more mature, the team realized that they needed to add
+ more customization to their widgets, so they created the AppCompat variant
+ with all of the same attributes plus some. *Note:* Unfortunately our app
+ uses both Legacy Widgets and AppCompat widgets, so when you define an
+ AppCompat attribute in a style, be sure to also define the Legacy version as
+ well if it exists.
+
+* Custom application attributes (colorIcon). It goes without saying that the
+ names can't collide with the framework attributes. These attributes server
+ to satisfy what the framework doesn't. For example, the framework doesn't
+ provide an attribute to tint all of your ImageViews (why would it?), so we
+ created the colorIcon attribute to apply to all ImageViews that show quantum
+ icons/assets that need to be tinted.
+
+Styles in this package follow a naming convention of inheritance:
+
+* Dialer. and Dialer.NoActionBar are the two root themes that should be used
+ to add sdk specific features (like coloring the Android nav bar).
+
+* Dialer.ThemeBase.ActionBar and Dialer.ThemeBase.NoActionBar are great
+ starting points for Activity style's to inherit from if they need specific
+ customizations.
+
+* Dialer.ThemeBase.ActionBar.* and Dialer.ThemeBase.NoActionBar.* are
+ specialized app themes intended to change the entire look of the app. For
+ example, Dialer.ThemeBase.NoActionBar.Dark is used for a dark mode theme. If
+ you create a custom theme for an activity, be sure your customization will
+ work for all themes. See dialer/dialpadview/theme for an example.
+
+## theme/common
+
+This is a dumping ground for shared resources. Some examples of what should live
+here:
+
+* Colors that can't be theme'd (there aren't many of those, so you probably
+ won't do that).
+* Drawables, images, animations, dimensions, styles, ect. that can be (or are)
+ used throughout the entire app without the need for customization. If you
+ want to customize a specific style for one use case, feel free to override
+ it and store it in your own resource directory.
+
+## theme/private
+
+This package is only visible to theme/base. Things you should never do:
+
+* Reference anything in here.
+* Duplicate the resources from this directory into another.
+
+Things you should do:
+
+* Add colors that are common throughout the entire app and need be themed. For
+ example, text colors, background colors and app primary and accent colors.
+ Each color you add needs to exist in each color_*.xml file where *
+ represents an app theme like 'dark' or 'light'.
diff --git a/java/com/android/dialer/theme/attributes/AndroidManifest.xml b/java/com/android/dialer/theme/base/AndroidManifest.xml
index 1a50716d2..ff7891055 100644
--- a/java/com/android/dialer/theme/attributes/AndroidManifest.xml
+++ b/java/com/android/dialer/theme/base/AndroidManifest.xml
@@ -13,4 +13,4 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
-<manifest package="com.android.dialer.theme.attributes"/>
+<manifest package="com.android.dialer.theme.base"/>
diff --git a/java/com/android/dialer/theme/ThemeUtil.java b/java/com/android/dialer/theme/base/ThemeUtil.java
index 227224448..a2d70c951 100644
--- a/java/com/android/dialer/theme/ThemeUtil.java
+++ b/java/com/android/dialer/theme/base/ThemeUtil.java
@@ -14,22 +14,36 @@
* limitations under the License.
*/
-package com.android.dialer.theme;
+package com.android.dialer.theme.base;
import android.content.Context;
import android.content.res.TypedArray;
import android.support.annotation.ColorInt;
+import android.support.annotation.IntDef;
import android.support.annotation.StyleRes;
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import com.android.dialer.common.Assert;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
/** Utility for fetching */
@SuppressWarnings("unused")
public class ThemeUtil {
- private static int theme = -1;
+ /** IntDef for the different themes Dialer supports. */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef({UNKNOWN, LIGHT, DARK})
+ public @interface Theme {}
+
+ public static final int UNKNOWN = 0;
+ public static final int LIGHT = 1;
+ public static final int DARK = 2;
+
+ private static @Theme int theme = UNKNOWN;
+
private static int colorIcon = -1;
+ private static int colorIconSecondary = -1;
private static int colorPrimary = -1;
private static int colorPrimaryDark = -1;
private static int colorAccent = -1;
@@ -39,17 +53,20 @@ public class ThemeUtil {
private static int textColorHint = -1;
private static int colorBackground = -1;
private static int colorBackgroundFloating = -1;
+ private static int colorTextOnUnthemedDarkBackground = -1;
+ private static int colorIconOnUnthemedDarkBackground = -1;
public static void initializeTheme(Context context) {
// TODO(a bug): add share prefs check to configure this
- theme = R.style.Dialer_ThemeBase_NoActionBar;
+ theme = LIGHT;
+
context = context.getApplicationContext();
- context.setTheme(theme);
+ context.setTheme(getApplicationThemeRes());
TypedArray array =
context
.getTheme()
.obtainStyledAttributes(
- theme,
+ getApplicationThemeRes(),
new int[] {
android.R.attr.colorPrimary,
android.R.attr.colorPrimaryDark,
@@ -61,6 +78,9 @@ public class ThemeUtil {
android.R.attr.colorBackground,
android.R.attr.colorBackgroundFloating,
R.attr.colorIcon,
+ R.attr.colorIconSecondary,
+ R.attr.colorTextOnUnthemedDarkBackground,
+ R.attr.colorIconOnUnthemedDarkBackground,
});
colorPrimary = array.getColor(/* index= */ 0, /* defValue= */ -1);
colorPrimaryDark = array.getColor(/* index= */ 1, /* defValue= */ -1);
@@ -72,14 +92,51 @@ public class ThemeUtil {
colorBackground = array.getColor(/* index= */ 7, /* defValue= */ -1);
colorBackgroundFloating = array.getColor(/* index= */ 8, /* defValue= */ -1);
colorIcon = array.getColor(/* index= */ 9, /* defValue= */ -1);
+ colorIconSecondary = array.getColor(/* index= */ 10, /* defValue= */ -1);
+ colorTextOnUnthemedDarkBackground = array.getColor(/* index= */ 11, /* defValue= */ -1);
+ colorIconOnUnthemedDarkBackground = array.getColor(/* index= */ 12, /* defValue= */ -1);
array.recycle();
}
+ /**
+ * Returns the {@link Theme} that the application is using. Activities should check this value if
+ * their custom style needs to customize further based on the application theme.
+ */
+ public static @Theme int getTheme() {
+ Assert.checkArgument(theme != UNKNOWN);
+ return theme;
+ }
+
+ public static @StyleRes int getApplicationThemeRes() {
+ switch (theme) {
+ case DARK:
+ return R.style.Dialer_Dark_ThemeBase_NoActionBar;
+ case LIGHT:
+ return R.style.Dialer_ThemeBase_NoActionBar;
+ case UNKNOWN:
+ default:
+ throw Assert.createIllegalStateFailException("Theme hasn't been set yet.");
+ }
+ }
+
+ public static Context getThemedContext(Context context) {
+ return new ContextThemeWrapper(context, getApplicationThemeRes());
+ }
+
+ public static LayoutInflater getThemedLayoutInflator(LayoutInflater inflater) {
+ return inflater.cloneInContext(getThemedContext(inflater.getContext()));
+ }
+
public static @ColorInt int getColorIcon() {
Assert.checkArgument(colorIcon != -1);
return colorIcon;
}
+ public static @ColorInt int getColorIconSecondary() {
+ Assert.checkArgument(colorIconSecondary != -1);
+ return colorIconSecondary;
+ }
+
public static @ColorInt int getColorPrimary() {
Assert.checkArgument(colorPrimary != -1);
return colorPrimary;
@@ -95,16 +152,18 @@ public class ThemeUtil {
return textColorSecondary;
}
- public static @StyleRes int getTheme() {
- Assert.checkArgument(theme != -1);
- return theme;
+ public static @ColorInt int getTextColorPrimary() {
+ Assert.checkArgument(textColorPrimary != -1);
+ return textColorPrimary;
}
- public static Context getThemedContext(Context context) {
- return new ContextThemeWrapper(context, getTheme());
+ public static @ColorInt int getColorTextOnUnthemedDarkBackground() {
+ Assert.checkArgument(colorTextOnUnthemedDarkBackground != -1);
+ return colorTextOnUnthemedDarkBackground;
}
- public static LayoutInflater getThemedLayoutInflator(LayoutInflater inflater) {
- return inflater.cloneInContext(getThemedContext(inflater.getContext()));
+ public static @ColorInt int getColorIconOnUnthemedDarkBackground() {
+ Assert.checkArgument(colorIconOnUnthemedDarkBackground != -1);
+ return colorIconOnUnthemedDarkBackground;
}
}
diff --git a/java/com/android/dialer/theme/base/res/values/attr.xml b/java/com/android/dialer/theme/base/res/values/attr.xml
new file mode 100644
index 000000000..41c6225ad
--- /dev/null
+++ b/java/com/android/dialer/theme/base/res/values/attr.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2018 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License
+ -->
+<resources>
+ <!-- Used to style all icons in Dialer. -->
+ <attr name="colorIcon" format="color"/>
+ <!-- Used to style some icons a little lighter in Dialer. -->
+ <attr name="colorIconSecondary" format="color"/>
+ <!-- Used to color text on dark backgrounds. White in Light Theme. -->
+ <attr name="colorTextOnUnthemedDarkBackground" format="color"/>
+ <!-- Used to color icons on dark backgrounds. White in Light Theme. -->
+ <attr name="colorIconOnUnthemedDarkBackground" format="color"/>
+</resources> \ No newline at end of file
diff --git a/java/com/android/dialer/theme/base/res/values/styles_dialer_light.xml b/java/com/android/dialer/theme/base/res/values/styles_dialer_light.xml
new file mode 100644
index 000000000..cfdee7801
--- /dev/null
+++ b/java/com/android/dialer/theme/base/res/values/styles_dialer_light.xml
@@ -0,0 +1,53 @@
+<!--
+ ~ 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>
+ <!-- TODO(a bug): properly document this or delete it -->
+ <!-- We don't want to style this, need to discuss with Yen why this was used instead of a default theme -->
+ <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.ActionBar">
+ <!-- Setting text. -->
+ <item name="android:textColorPrimary">@color/settings_text_color_primary</item>
+ <!-- Setting description. -->
+ <item name="android:textColorSecondary">@color/settings_text_color_secondary</item>
+ <item name="android:windowBackground">?android:attr/colorBackground</item>
+ <item name="android:colorAccent">?android:attr/colorPrimary</item>
+ <item name="android:textColorLink">?android:attr/colorPrimary</item>
+ </style>
+
+ <!-- TODO(a bug): This is only actively used in empty_content_view.xml. Move it there. -->
+ <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>
+</resources>
diff --git a/java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml b/java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml
new file mode 100644
index 000000000..e01a3a282
--- /dev/null
+++ b/java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml
@@ -0,0 +1,64 @@
+<?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>
+ <!-- Deprecated: ActionBars are clunky and Toolbar (along with Dialer.ThemeBase.NoActionBar)
+ should be used in favor-->
+ <style name="Dialer.Dark.ThemeBase.ActionBar">
+ <!-- These are used to style all actionbars in Dialer. These aren't needed in Dialer.ThemeBase.NoActionBar -->
+ <item name="actionBarStyle">@style/DialerActionBarBaseStyle</item>
+ <item name="actionBarSize">@dimen/action_bar_height</item>
+ </style>
+
+ <style name="Dialer.Dark.ThemeBase.NoActionBar">
+ <!-- Copied from Theme.AppCompat.Light.NoActionBar. We can remove this and update the Dialer
+ base style once none of our activities depend on ActionBar anymore. -->
+ <item name="windowActionBar">false</item>
+ <item name="windowNoTitle">true</item>
+ </style>
+
+ <!-- Activities and Applications should inherit from one of the themes above. -->
+ <style name="Dialer.Dark.ThemeBase">
+ <!-- These values should be used to color all backgrounds. -->
+ <item name="android:colorBackground">@color/dialer_dark_background</item>
+ <item name="android:colorBackgroundFloating">@color/dialer_dark_background_floating</item>
+
+ <!-- These values should be used to set text color. -->
+ <!-- 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>
+ <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>
+
+ <!-- Dialer specific attributes. -->
+ <item name="colorIcon">?android:attr/textColorSecondary</item>
+ <item name="colorIconSecondary">?android:attr/textColorSecondary</item>
+ <item name="colorTextOnUnthemedDarkBackground">@color/dialer_primary_text_color_inverse</item>
+ <item name="colorIconOnUnthemedDarkBackground">@color/dialer_icon_color_white</item>
+ </style>
+</resources> \ No newline at end of file
diff --git a/java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml b/java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml
new file mode 100644
index 000000000..667b9726d
--- /dev/null
+++ b/java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml
@@ -0,0 +1,81 @@
+<?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>
+ <!-- Deprecated: ActionBars are clunky and Toolbar (along with Dialer.ThemeBase.NoActionBar)
+ should be used in favor-->
+ <style name="Dialer.ThemeBase.ActionBar">
+ <!-- These are used to style all actionbars in Dialer. These aren't needed in Dialer.ThemeBase.NoActionBar -->
+ <item name="actionBarStyle">@style/DialerActionBarBaseStyle</item>
+ <item name="actionBarSize">@dimen/action_bar_height</item>
+ </style>
+
+ <style name="Dialer.ThemeBase.NoActionBar">
+ <!-- Copied from Theme.AppCompat.Light.NoActionBar. We can remove this and update the Dialer
+ base style once none of our activities depend on ActionBar anymore. -->
+ <item name="windowActionBar">false</item>
+ <item name="windowNoTitle">true</item>
+ </style>
+
+ <!-- Activities and Applications should inherit from one of the themes above. -->
+ <style name="Dialer.ThemeBase">
+ <!-- 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>
+
+ <!-- Dialer specific attributes. -->
+ <item name="colorIcon">@color/dialer_secondary_text_color</item>
+ <item name="colorIconSecondary">@color/dialer_icon_color_secondary</item>
+ <item name="colorTextOnUnthemedDarkBackground">@color/dialer_primary_text_color_inverse</item>
+ <item name="colorIconOnUnthemedDarkBackground">@color/dialer_icon_color_white</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>
+
+ <!-- Deprecated: Use Toolbar instead of ActionBar. -->
+ <!-- Used to style all Dialer's action bars. Every actionbar is awarded this for free if the parent
+ activity's theme extends from Dialer.ThemeBase.ActionBar or doesn't specify a theme. -->
+ <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>
+</resources>
diff --git a/java/com/android/dialer/theme/attributes/res/values/attr.xml b/java/com/android/dialer/theme/common/AndroidManifest.xml
index 6db0aa8d3..51e532e2a 100644
--- a/java/com/android/dialer/theme/attributes/res/values/attr.xml
+++ b/java/com/android/dialer/theme/common/AndroidManifest.xml
@@ -1,4 +1,3 @@
-<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2018 The Android Open Source Project
~
@@ -14,8 +13,4 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
-<resources>
-
- <!-- Used to style all icons in Dialer. -->
- <attr name="colorIcon" format="reference"/>
-</resources> \ No newline at end of file
+<manifest package="com.android.dialer.theme.common"/>
diff --git a/java/com/android/dialer/theme/common/res/anim/front_back_switch_button_animation.xml b/java/com/android/dialer/theme/common/res/anim/front_back_switch_button_animation.xml
new file mode 100644
index 000000000..152497b9f
--- /dev/null
+++ b/java/com/android/dialer/theme/common/res/anim/front_back_switch_button_animation.xml
@@ -0,0 +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
+ -->
+<set
+ xmlns:android="http://schemas.android.com/apk/res/android">
+ <set
+ android:ordering="sequentially">
+ <objectAnimator
+ android:duration="500"
+ android:propertyName="rotation"
+ android:valueFrom="0.0"
+ android:valueTo="-180.0"
+ android:valueType="floatType"
+ android:interpolator="@android:interpolator/fast_out_slow_in"/>
+ </set>
+</set> \ No newline at end of file
diff --git a/java/com/android/dialer/theme/res/animator/activated_button_elevation.xml b/java/com/android/dialer/theme/common/res/animator/activated_button_elevation.xml
index b8ea4e8e6..2b47f0d3c 100644
--- a/java/com/android/dialer/theme/res/animator/activated_button_elevation.xml
+++ b/java/com/android/dialer/theme/common/res/animator/activated_button_elevation.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
+ -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_enabled="true"
diff --git a/java/com/android/dialer/theme/res/drawable-hdpi/empty_speed_dial.png b/java/com/android/dialer/theme/common/res/drawable-hdpi/empty_speed_dial.png
index 5a1829599..5a1829599 100644
--- a/java/com/android/dialer/theme/res/drawable-hdpi/empty_speed_dial.png
+++ b/java/com/android/dialer/theme/common/res/drawable-hdpi/empty_speed_dial.png
Binary files differ
diff --git a/java/com/android/dialer/theme/res/drawable-mdpi/empty_speed_dial.png b/java/com/android/dialer/theme/common/res/drawable-mdpi/empty_speed_dial.png
index 3c95eeb33..3c95eeb33 100644
--- a/java/com/android/dialer/theme/res/drawable-mdpi/empty_speed_dial.png
+++ b/java/com/android/dialer/theme/common/res/drawable-mdpi/empty_speed_dial.png
Binary files differ
diff --git a/java/com/android/dialer/theme/res/drawable-xhdpi/empty_speed_dial.png b/java/com/android/dialer/theme/common/res/drawable-xhdpi/empty_speed_dial.png
index 9335011fe..9335011fe 100644
--- a/java/com/android/dialer/theme/res/drawable-xhdpi/empty_speed_dial.png
+++ b/java/com/android/dialer/theme/common/res/drawable-xhdpi/empty_speed_dial.png
Binary files differ
diff --git a/java/com/android/dialer/theme/res/drawable-xxhdpi/empty_speed_dial.png b/java/com/android/dialer/theme/common/res/drawable-xxhdpi/empty_speed_dial.png
index 04ab7b4dc..04ab7b4dc 100644
--- a/java/com/android/dialer/theme/res/drawable-xxhdpi/empty_speed_dial.png
+++ b/java/com/android/dialer/theme/common/res/drawable-xxhdpi/empty_speed_dial.png
Binary files differ
diff --git a/java/com/android/dialer/theme/res/drawable/front_back_switch_button.xml b/java/com/android/dialer/theme/common/res/drawable/front_back_switch_button.xml
index 2dc3eb1fa..56fafcaa6 100644
--- a/java/com/android/dialer/theme/res/drawable/front_back_switch_button.xml
+++ b/java/com/android/dialer/theme/common/res/drawable/front_back_switch_button.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
+ -->
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="front_back_switch_button"
diff --git a/java/com/android/dialer/widget/res/values/colors.xml b/java/com/android/dialer/theme/common/res/drawable/front_back_switch_button_animation.xml
index 70c3197cf..687061639 100644
--- a/java/com/android/dialer/widget/res/values/colors.xml
+++ b/java/com/android/dialer/theme/common/res/drawable/front_back_switch_button_animation.xml
@@ -14,11 +14,10 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
-<resources>
-
- <!-- Color of ripples used for views with light backgrounds -->
- <color name="dialer_ripple_material_light">#30000000</color>
-
- <color name="empty_list_text_color">#b2b2b2</color>
- <color name="empty_voicemail_icon_tint_color">#E1E1E1</color>
-</resources> \ No newline at end of file
+<animated-vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:drawable="@drawable/front_back_switch_button">
+ <target
+ android:name="layer_10_outlines"
+ android:animation="@anim/front_back_switch_button_animation"/>
+</animated-vector> \ No newline at end of file
diff --git a/java/com/android/dialer/theme/common/res/drawable/item_background_material_borderless_dark.xml b/java/com/android/dialer/theme/common/res/drawable/item_background_material_borderless_dark.xml
new file mode 100644
index 000000000..e18300e1a
--- /dev/null
+++ b/java/com/android/dialer/theme/common/res/drawable/item_background_material_borderless_dark.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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.
+-->
+
+<!-- Based on the Theme.Material's default selectableItemBackgroundBorderless -->
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+ android:color="#A0FFFFFF"/> \ No newline at end of file
diff --git a/java/com/android/dialer/theme/res/values/colors.xml b/java/com/android/dialer/theme/common/res/values/colors.xml
index 7c62a2103..8f5976703 100644
--- a/java/com/android/dialer/theme/res/values/colors.xml
+++ b/java/com/android/dialer/theme/common/res/values/colors.xml
@@ -16,7 +16,7 @@
-->
<!-- The colors in this file aren't configured at the theme level. -->
<resources>
- <color name="dialpad_fab_green">#00C853</color>
+ <color name="dialer_call_green">#00C853</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>
@@ -26,6 +26,8 @@
<color name="notification_action_dismiss">#A52714</color>
<color name="notification_action_answer_video">#097138</color>
+ <color name="dialer_red">#C53929</color>
+
<!-- Legacy -->
<color name="blue_grey_100">#CFD8DC</color>
</resources> \ No newline at end of file
diff --git a/java/com/android/dialer/theme/res/values/dimens.xml b/java/com/android/dialer/theme/common/res/values/dimens.xml
index 4abe4b53a..88b8a0423 100644
--- a/java/com/android/dialer/theme/res/values/dimens.xml
+++ b/java/com/android/dialer/theme/common/res/values/dimens.xml
@@ -54,8 +54,4 @@
<!-- 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/strings.xml b/java/com/android/dialer/theme/common/res/values/strings.xml
index 7d7209207..7d7209207 100644
--- a/java/com/android/dialer/theme/res/values/strings.xml
+++ b/java/com/android/dialer/theme/common/res/values/strings.xml
diff --git a/java/com/android/dialer/theme/common/res/values/styles.xml b/java/com/android/dialer/theme/common/res/values/styles.xml
new file mode 100644
index 000000000..2c6446ca1
--- /dev/null
+++ b/java/com/android/dialer/theme/common/res/values/styles.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2018 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License
+ -->
+<resources>
+ <!-- TODO(calderwoodra): Delete this once new call log and new voicemail ship. -->
+ <!-- Ideally we would make a callLogCardStyle attribute but we don't want to expand dialer/app -->
+ <style name="CallLogCardStyle" parent="CardView">
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:layout_margin">4dp</item>
+ <item name="android:baselineAligned">false</item>
+ <item name="cardCornerRadius">2dp</item>
+ <item name="cardBackgroundColor">?android:attr/colorBackgroundFloating</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> \ No newline at end of file
diff --git a/java/com/android/dialer/theme/common/res/values/text_styles.xml b/java/com/android/dialer/theme/common/res/values/text_styles.xml
new file mode 100644
index 000000000..9cf4a7689
--- /dev/null
+++ b/java/com/android/dialer/theme/common/res/values/text_styles.xml
@@ -0,0 +1,87 @@
+<?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>
+ <!--
+ - These are official UX approved text styles and all TextViews should inherit from one of these.
+ - If you think you don't see the style you need, double check with your UX designer.
+ -->
+ <style name="Dialer.TextAppearance.Header1" parent="TextAppearance.AppCompat">
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ <item name="android:textSize">18sp</item>
+ <item name="android:fontFamily">sans-serif-regular</item>
+ </style>
+
+ <style name="Dialer.TextAppearance.Header2" parent="TextAppearance.AppCompat">
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ <item name="android:textSize">16sp</item>
+ <item name="android:fontFamily">sans-serif-medium</item>
+ </style>
+
+ <style name="Dialer.TextAppearance.Primary" parent="TextAppearance.AppCompat">
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ <item name="android:textSize">16sp</item>
+ <item name="android:fontFamily">sans-serif-regular</item>
+ </style>
+
+ <style name="Dialer.TextAppearance.Secondary" parent="TextAppearance.AppCompat">
+ <item name="android:textColor">?android:attr/textColorSecondary</item>
+ <item name="android:textSize">14sp</item>
+ <item name="android:fontFamily">sans-serif-regular</item>
+ </style>
+
+ <style name="Dialer.TextAppearance.Secondary2" parent="TextAppearance.AppCompat">
+ <item name="android:textColor">?android:attr/textColorSecondary</item>
+ <item name="android:textSize">12sp</item>
+ <item name="android:fontFamily">sans-serif-regular</item>
+ </style>
+
+ <style name="Dialer.TextAppearance.OVERLINE" parent="TextAppearance.AppCompat">
+ <item name="android:textColor">?android:attr/textColorSecondary</item>
+ <item name="android:textSize">14sp</item>
+ <item name="android:fontFamily">sans-serif-medium</item>
+ </style>
+
+ <style name="Dialer.TextAppearance.Header1.Ellipsize" parent="Dialer.TextAppearance.Header1">
+ <item name="android:ellipsize">end</item>
+ <item name="android:maxLines">1</item>
+ </style>
+
+ <style name="Dialer.TextAppearance.Header2.Ellipsize" parent="Dialer.TextAppearance.Header2">
+ <item name="android:ellipsize">end</item>
+ <item name="android:maxLines">1</item>
+ </style>
+
+ <style name="Dialer.TextAppearance.Primary.Ellipsize" parent="Dialer.TextAppearance.Primary">
+ <item name="android:ellipsize">end</item>
+ <item name="android:maxLines">1</item>
+ </style>
+
+ <style name="Dialer.TextAppearance.Secondary.Ellipsize" parent="Dialer.TextAppearance.Secondary">
+ <item name="android:ellipsize">end</item>
+ <item name="android:maxLines">1</item>
+ </style>
+
+ <style name="Dialer.TextAppearance.Secondary2.Ellipsize" parent="Dialer.TextAppearance.Secondary">
+ <item name="android:ellipsize">end</item>
+ <item name="android:maxLines">1</item>
+ </style>
+
+ <style name="Dialer.TextAppearance.OVERLINE.Ellipsize" parent="Dialer.TextAppearance.OVERLINE">
+ <item name="android:ellipsize">end</item>
+ <item name="android:maxLines">1</item>
+ </style>
+</resources> \ No newline at end of file
diff --git a/java/com/android/dialer/theme/private/AndroidManifest.xml b/java/com/android/dialer/theme/private/AndroidManifest.xml
new file mode 100644
index 000000000..1cdd0e087
--- /dev/null
+++ b/java/com/android/dialer/theme/private/AndroidManifest.xml
@@ -0,0 +1,16 @@
+<!--
+ ~ 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 package="com.android.dialer.theme.private"/>
diff --git a/java/com/android/dialer/widget/res/drawable/ripple_material_light.xml b/java/com/android/dialer/theme/private/res/color/dialer_dark_primary_text_color.xml
index 175624c8b..82e79c631 100644
--- a/java/com/android/dialer/widget/res/drawable/ripple_material_light.xml
+++ b/java/com/android/dialer/theme/private/res/color/dialer_dark_primary_text_color.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- ~ Copyright (C) 2014 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.
@@ -14,10 +14,8 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
-
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
- android:color="@color/dialer_ripple_material_light">
- <item android:id="@android:id/mask">
- <color android:color="@android:color/white"/>
- </item>
-</ripple>
+<!-- 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_dark_text_color_disabled"/>
+ <item android:color="@color/dialer_dark_primary_text_color_enabled"/>
+</selector>
diff --git a/java/com/android/dialer/theme/private/res/color/dialer_dark_secondary_text_color.xml b/java/com/android/dialer/theme/private/res/color/dialer_dark_secondary_text_color.xml
new file mode 100644
index 000000000..d057f9e65
--- /dev/null
+++ b/java/com/android/dialer/theme/private/res/color/dialer_dark_secondary_text_color.xml
@@ -0,0 +1,21 @@
+<?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
+ -->
+<!-- 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_dark_text_color_disabled"/>
+ <item android:color="@color/dialer_dark_secondary_text_color_enabled"/>
+</selector>
diff --git a/java/com/android/dialer/theme/res/color/dialer_primary_text_color.xml b/java/com/android/dialer/theme/private/res/color/dialer_primary_text_color.xml
index 6612b17ab..6612b17ab 100644
--- a/java/com/android/dialer/theme/res/color/dialer_primary_text_color.xml
+++ b/java/com/android/dialer/theme/private/res/color/dialer_primary_text_color.xml
diff --git a/java/com/android/dialer/theme/res/color/dialer_secondary_text_color.xml b/java/com/android/dialer/theme/private/res/color/dialer_secondary_text_color.xml
index e1c000aef..e1c000aef 100644
--- a/java/com/android/dialer/theme/res/color/dialer_secondary_text_color.xml
+++ b/java/com/android/dialer/theme/private/res/color/dialer_secondary_text_color.xml
diff --git a/java/com/android/dialer/theme/res/color/settings_text_color_primary.xml b/java/com/android/dialer/theme/private/res/color/settings_text_color_primary.xml
index ba259088a..7a14d22fa 100644
--- a/java/com/android/dialer/theme/res/color/settings_text_color_primary.xml
+++ b/java/com/android/dialer/theme/private/res/color/settings_text_color_primary.xml
@@ -18,6 +18,6 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:color="@color/setting_disabled_color" android:state_enabled="false"/>
- <item android:color="@color/setting_primary_color"/>
+ <item android:color="@color/dialer_text_color_disabled" android:state_enabled="false"/>
+ <item android:color="@color/dialer_primary_text_color_enabled"/>
</selector>
diff --git a/java/com/android/dialer/theme/res/color/settings_text_color_secondary.xml b/java/com/android/dialer/theme/private/res/color/settings_text_color_secondary.xml
index 2f7899272..c4baefd33 100644
--- a/java/com/android/dialer/theme/res/color/settings_text_color_secondary.xml
+++ b/java/com/android/dialer/theme/private/res/color/settings_text_color_secondary.xml
@@ -18,6 +18,6 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:color="@color/setting_disabled_color" android:state_enabled="false"/>
- <item android:color="@color/setting_secondary_color"/>
+ <item android:color="@color/dialer_text_color_disabled" android:state_enabled="false"/>
+ <item android:color="@color/dialer_secondary_text_color_enabled"/>
</selector>
diff --git a/java/com/android/dialer/theme/private/res/values/colors_dialer_dark.xml b/java/com/android/dialer/theme/private/res/values/colors_dialer_dark.xml
new file mode 100644
index 000000000..7dc894be9
--- /dev/null
+++ b/java/com/android/dialer/theme/private/res/values/colors_dialer_dark.xml
@@ -0,0 +1,40 @@
+<!--
+ ~ 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>
+ <!-- Essential theme colors -->
+ <color name="dialer_dark_theme_color">#2A56C6</color>
+ <color name="dialer_dark_theme_color_dark">#1C3AA9</color>
+ <color name="dialer_dark_secondary_color">#F50057</color>
+ <color name="dialer_dark_theme_color_20pct">#332A56C6</color>
+
+ <!-- Text colors -->
+ <color name="dialer_dark_primary_text_color_enabled">#FFFFFF</color>
+ <color name="dialer_dark_secondary_text_color_enabled">#DDFFFFFF</color>
+ <color name="dialer_dark_text_color_disabled">#333333</color>
+ <color name="dialer_dark_text_hint_color">#DE78909C</color>
+ <color name="dialer_dark_primary_text_color_inverse">#212121</color>
+ <color name="dialer_dark_secondary_text_color_inverse">#636363</color>
+ <color name="dialer_dark_snackbar_action_text_color">#4285F4</color>
+
+ <!-- Background colors -->
+ <color name="dialer_dark_background">#212121</color>
+ <color name="dialer_dark_background_floating">#000000</color>
+
+ <!-- Other useful colors -->
+ <color name="dialer_dark_icon_color">#C4000000</color>
+ <color name="dialer_icon_color_secondary">#E1E1E1</color>
+ <color name="dialer_icon_color_white">#FFFFFF</color>
+</resources>
diff --git a/java/com/android/dialer/theme/res/values/colors_dialer_light.xml b/java/com/android/dialer/theme/private/res/values/colors_dialer_light.xml
index ea8247414..1d5a1e7ee 100644
--- a/java/com/android/dialer/theme/res/values/colors_dialer_light.xml
+++ b/java/com/android/dialer/theme/private/res/values/colors_dialer_light.xml
@@ -40,16 +40,12 @@
<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>
+ <color name="dialer_icon_color_secondary">#E1E1E1</color>
+ <color name="dialer_icon_color_white">#FFFFFF</color>
</resources>
diff --git a/java/com/android/dialer/theme/private/res/values/styles.xml b/java/com/android/dialer/theme/private/res/values/styles.xml
new file mode 100644
index 000000000..158cd190d
--- /dev/null
+++ b/java/com/android/dialer/theme/private/res/values/styles.xml
@@ -0,0 +1,55 @@
+<?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>
+ <!-- Update to Theme.AppCompat.Light.NoActionBar once we no longer depend on ActionBars. -->
+ <style name="Dialer" parent="Theme.AppCompat.Light">
+ <!-- Used to automatically style all buttons in Dialer -->
+ <item name="android:textAppearanceButton">@style/DialerButtonTextStyle</item>
+ <item name="android:colorButtonNormal">?android:attr/colorPrimary</item>
+
+ <!-- Used to style link text -->
+ <item name="android:textColorLink">@color/dialer_theme_color</item>
+
+ <!-- Used to automatically style AlertDialogs -->
+ <item name="alertDialogTheme">@style/AlertDialogTheme</item>
+ </style>
+
+ <style name="Dialer.Dark" parent="Theme.AppCompat">
+ <!-- Used to automatically style all buttons in Dialer -->
+ <item name="android:textAppearanceButton">@style/DialerButtonTextStyle</item>
+ <item name="android:colorButtonNormal">?android:attr/colorPrimary</item>
+
+ <!-- Used to style link text -->
+ <item name="android:textColorLink">@color/dialer_theme_color</item>
+
+ <!-- Used to automatically style AlertDialogs -->
+ <item name="alertDialogTheme">@style/AlertDialogTheme</item>
+ </style>
+
+ <!-- Used to style all Dialer's button's text. Every button is awarded this for free if the parent
+ activity's theme extends from Dialer.ThemeBase(.NoActionBar) or doesn't specify a theme. -->
+ <style name="DialerButtonTextStyle" parent="@android:style/TextAppearance.Material.Widget.Button">
+ <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
+ </style>
+
+ <!-- Used to style all Dialer's AlertDialogs. Every button is awarded this for free if the parent
+ activity's theme extends from Dialer.ThemeBase(.NoActionBar) or doesn't specify a theme. -->
+ <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>
+</resources> \ No newline at end of file
diff --git a/java/com/android/dialer/theme/res/anim/front_back_switch_button_animation.xml b/java/com/android/dialer/theme/res/anim/front_back_switch_button_animation.xml
deleted file mode 100644
index 30986457b..000000000
--- a/java/com/android/dialer/theme/res/anim/front_back_switch_button_animation.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<set
- xmlns:android="http://schemas.android.com/apk/res/android">
- <set
- android:ordering="sequentially">
- <objectAnimator
- android:duration="500"
- android:propertyName="rotation"
- android:valueFrom="0.0"
- android:valueTo="-180.0"
- android:valueType="floatType"
- android:interpolator="@android:interpolator/fast_out_slow_in"/>
- </set>
-</set> \ No newline at end of file
diff --git a/java/com/android/dialer/theme/res/drawable/front_back_switch_button_animation.xml b/java/com/android/dialer/theme/res/drawable/front_back_switch_button_animation.xml
deleted file mode 100644
index 14cda1ba8..000000000
--- a/java/com/android/dialer/theme/res/drawable/front_back_switch_button_animation.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<animated-vector
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:drawable="@drawable/front_back_switch_button">
- <target
- android:name="layer_10_outlines"
- android:animation="@anim/front_back_switch_button_animation"/>
-</animated-vector> \ No newline at end of file
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
deleted file mode 100644
index 6ce3b1960..000000000
--- a/java/com/android/dialer/theme/res/values/styles_dialer_light.xml
+++ /dev/null
@@ -1,110 +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">?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/voicemail/listui/NewVoicemailFragment.java b/java/com/android/dialer/voicemail/listui/NewVoicemailFragment.java
index 243dc6a86..87b0a6343 100644
--- a/java/com/android/dialer/voicemail/listui/NewVoicemailFragment.java
+++ b/java/com/android/dialer/voicemail/listui/NewVoicemailFragment.java
@@ -207,7 +207,6 @@ public final class NewVoicemailFragment extends Fragment implements LoaderCallba
emptyContentView.setDescription((R.string.empty_voicemail_tab_text));
emptyContentView.setImage(R.drawable.quantum_ic_voicemail_vd_theme_24);
- emptyContentView.setImageTint(R.color.empty_voicemail_icon_tint_color, null);
}
private void showView(View view) {
diff --git a/java/com/android/dialer/voicemail/listui/error/res/layout/voicemail_error_message_fragment.xml b/java/com/android/dialer/voicemail/listui/error/res/layout/voicemail_error_message_fragment.xml
index 0a9b49c5d..dab2f2113 100644
--- a/java/com/android/dialer/voicemail/listui/error/res/layout/voicemail_error_message_fragment.xml
+++ b/java/com/android/dialer/voicemail/listui/error/res/layout/voicemail_error_message_fragment.xml
@@ -53,21 +53,18 @@
<TextView
android:id="@+id/error_card_header"
- android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/voicemail_promo_card_title_padding"
android:layout_gravity="center_vertical"
- android:singleLine="false"
- android:textSize="@dimen/voicemail_promo_card_title_text_size"/>
+ style="@style/Dialer.TextAppearance.Header2"/>
<TextView
android:id="@+id/error_card_details"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lineSpacingExtra="@dimen/voicemail_promo_card_line_spacing"
- android:singleLine="false"
- android:textSize="@dimen/voicemail_promo_card_message_size"/>
+ style="@style/Dialer.TextAppearance.Secondary"/>
</LinearLayout>
</LinearLayout>
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 95866dfab..4267e8cd0 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
@@ -56,7 +56,7 @@
</style>
<style name="TosTitleStyle">
- <item name="android:textColor">@color/primary_text_color</item>
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">20sp</item>
<item name="android:fontFamily">"sans-serif-medium"</item>
</style>
@@ -75,7 +75,7 @@
<style name="TosDetailsTextStyle">
<item name="android:textSize">12sp</item>
- <item name="android:textColor">@color/dialer_secondary_text_color</item>
+ <item name="android:textColor">?android:attr/textColorSecondary</item>
<item name="android:fontFamily">"sans-serif-regular"</item>
<item name="android:lineSpacingExtra">12sp</item>
</style>
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 b5e095ba4..95711e041 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,14 +39,12 @@
<TextView
android:id="@+id/primary_text"
- style="@style/Dialer.TextAppearance.Primary"
+ style="@style/Dialer.TextAppearance.Primary.Ellipsize"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
android:layout_marginEnd="6dp"
- android:ellipsize="end"
- android:lineSpacingMultiplier="1.5"
- android:singleLine="true"/>
+ android:lineSpacingMultiplier="1.5"/>
<LinearLayout
android:layout_width="wrap_content"
@@ -66,12 +64,10 @@
<TextView
android:id="@+id/secondary_text"
- style="@style/Dialer.TextAppearance.Secondary"
+ style="@style/Dialer.TextAppearance.Secondary.Ellipsize"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:ellipsize="end"
- android:lineSpacingMultiplier="1.4"
- android:singleLine="true"/>
+ android:lineSpacingMultiplier="1.4"/>
</LinearLayout>
<!-- TODO(a bug): Make text selectable -->
@@ -110,5 +106,5 @@
android:contentDescription="@string/a11y_voicemail_entry_expand_menu"
android:scaleType="center"
android:src="@drawable/quantum_ic_more_vert_vd_theme_24"
- android:tint="@color/dialer_secondary_text_color"/>
+ android:tint="?colorIcon"/>
</RelativeLayout>
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 109cecc2c..1df8b2cdb 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
@@ -50,23 +50,20 @@
<TextView
android:id="@+id/voicemail_alert_header"
- android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/voicemail_promo_card_title_padding"
android:layout_gravity="center_vertical"
- android:singleLine="false"
android:text="Voicemail Alert"
- android:textSize="@dimen/voicemail_promo_card_title_text_size"/>
+ style="@style/Dialer.TextAppearance.Header2"/>
<TextView
android:id="@+id/voicemail_alert_details"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lineSpacingExtra="@dimen/voicemail_promo_card_line_spacing"
- android:singleLine="false"
android:text="This is a voicemail alert message."
- android:textSize="@dimen/voicemail_promo_card_message_size"/>
+ style="@style/Dialer.TextAppearance.Secondary"/>
</LinearLayout>
</LinearLayout>
diff --git a/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry_header.xml b/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry_header.xml
index 7e4fe62cf..70ca2ac40 100644
--- a/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry_header.xml
+++ b/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_entry_header.xml
@@ -21,7 +21,7 @@
android:layout_height="wrap_content">
<TextView
android:id="@+id/new_voicemail_header_text"
- style="@style/SubHeader"
+ style="@style/Dialer.TextAppearance.Secondary.Ellipsize"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
diff --git a/java/com/android/dialer/voicemail/listui/res/values/styles.xml b/java/com/android/dialer/voicemail/listui/res/values/styles.xml
index 386992788..cbc010266 100644
--- a/java/com/android/dialer/voicemail/listui/res/values/styles.xml
+++ b/java/com/android/dialer/voicemail/listui/res/values/styles.xml
@@ -24,7 +24,7 @@
</style>
<style name="TosTitleStyle">
- <item name="android:textColor">@color/primary_text_color</item>
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">20sp</item>
<item name="android:fontFamily">"sans-serif-medium"</item>
</style>
diff --git a/java/com/android/dialer/widget/EmptyContentView.java b/java/com/android/dialer/widget/EmptyContentView.java
index b99657a10..6d598ff2a 100644
--- a/java/com/android/dialer/widget/EmptyContentView.java
+++ b/java/com/android/dialer/widget/EmptyContentView.java
@@ -18,9 +18,6 @@ package com.android.dialer.widget;
import android.content.Context;
import android.content.res.ColorStateList;
-import android.content.res.Resources.Theme;
-import android.support.annotation.ColorRes;
-import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.util.AttributeSet;
import android.view.LayoutInflater;
@@ -28,6 +25,7 @@ import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
+import com.android.dialer.theme.base.ThemeUtil;
public class EmptyContentView extends LinearLayout implements View.OnClickListener {
@@ -68,6 +66,8 @@ public class EmptyContentView extends LinearLayout implements View.OnClickListen
descriptionView = (TextView) findViewById(R.id.empty_list_view_message);
actionView = (TextView) findViewById(R.id.empty_list_view_action);
actionView.setOnClickListener(this);
+
+ imageView.setImageTintList(ColorStateList.valueOf(ThemeUtil.getColorIconSecondary()));
}
public void setDescription(int resourceId) {
@@ -90,11 +90,6 @@ public class EmptyContentView extends LinearLayout implements View.OnClickListen
}
}
- public void setImageTint(@ColorRes int color, @Nullable Theme theme) {
- imageView.setImageTintList(
- (ColorStateList.valueOf(getContext().getResources().getColor(color, theme))));
- }
-
public void setActionLabel(@StringRes int resourceId) {
actionLabel = resourceId;
if (resourceId == NO_LABEL) {
diff --git a/java/com/android/dialer/widget/res/layout-land/empty_content_view.xml b/java/com/android/dialer/widget/res/layout-land/empty_content_view.xml
index 3a7574f53..84e6fc825 100644
--- a/java/com/android/dialer/widget/res/layout-land/empty_content_view.xml
+++ b/java/com/android/dialer/widget/res/layout-land/empty_content_view.xml
@@ -32,7 +32,7 @@
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:gravity="center_horizontal|top"
- android:textColor="@color/empty_list_text_color"
+ android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/empty_list_message_text_size"/>
<TextView
diff --git a/java/com/android/dialer/widget/res/layout/contact_photo_view.xml b/java/com/android/dialer/widget/res/layout/contact_photo_view.xml
index 320d06b98..e13388649 100644
--- a/java/com/android/dialer/widget/res/layout/contact_photo_view.xml
+++ b/java/com/android/dialer/widget/res/layout/contact_photo_view.xml
@@ -68,7 +68,7 @@
android:layout_height="13dp"
android:layout_gravity="center"
android:src="@drawable/quantum_ic_rtt_vd_theme_24"
- android:tint="@android:color/white"
+ android:tint="?android:attr/colorBackground"
tools:ignore="ContentDescription"/>
</FrameLayout>
</FrameLayout> \ 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 0540a00bc..a75176a22 100644
--- a/java/com/android/dialer/widget/res/layout/dialer_toolbar.xml
+++ b/java/com/android/dialer/widget/res/layout/dialer_toolbar.xml
@@ -28,19 +28,15 @@
android:layout_height="wrap_content"
android:gravity="top"
android:textSize="@dimen/toolbar_title_text_size"
- android:textColor="?android:attr/colorBackground"
- android:fontFamily="sans-serif-medium"
- android:maxLines="1"
- android:ellipsize="end"/>
+ android:textColor="?android:attr/textColorPrimaryInverse"
+ style="@style/Dialer.TextAppearance.Header2"/>
<TextView
android:id="@+id/subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textSize="@dimen/toolbar_subtitle_text_size"
- android:textColor="?android:attr/colorBackground"
+ android:textColor="?android:attr/textColorPrimaryInverse"
android:visibility="gone"
- android:maxLines="1"
- android:ellipsize="end"/>
+ style="@style/Dialer.TextAppearance.Secondary.Ellipsize"/>
</LinearLayout>
</merge> \ No newline at end of file
diff --git a/java/com/android/dialer/widget/res/layout/empty_content_view.xml b/java/com/android/dialer/widget/res/layout/empty_content_view.xml
index 9aac6f48f..57bb2fd5c 100644
--- a/java/com/android/dialer/widget/res/layout/empty_content_view.xml
+++ b/java/com/android/dialer/widget/res/layout/empty_content_view.xml
@@ -30,7 +30,7 @@
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:gravity="center_horizontal|top"
- android:textColor="@color/empty_list_text_color"
+ android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/empty_list_message_text_size"/>
<TextView
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 388a8d55a..1004fa8f9 100644
--- a/java/com/android/dialer/widget/res/layout/fragment_message.xml
+++ b/java/com/android/dialer/widget/res/layout/fragment_message.xml
@@ -52,7 +52,7 @@
android:padding="@dimen/textview_item_padding"
android:textSize="@dimen/message_item_text_size"
android:hint="@string/custom_message_hint"
- android:textColor="@color/dialer_primary_text_color"
+ android:textColor="?android:attr/textColorPrimary"
android:textColorHint="?android:attr/textColorHint"
android:background="?android:attr/colorBackground"
android:textCursorDrawable="@drawable/edittext_custom_cursor"
diff --git a/java/com/android/dialer/widget/res/layout/selectable_text_view.xml b/java/com/android/dialer/widget/res/layout/selectable_text_view.xml
index 9cdb162b6..5e13d9a5e 100644
--- a/java/com/android/dialer/widget/res/layout/selectable_text_view.xml
+++ b/java/com/android/dialer/widget/res/layout/selectable_text_view.xml
@@ -19,7 +19,6 @@
android:id="@+id/selectable_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textSize="16sp"
- android:textColor="@color/dialer_primary_text_color"
+ style="@style/Dialer.TextAppearance.Primary"
android:padding="16dp"
- android:background="@drawable/ripple_material_light"/> \ No newline at end of file
+ android:background="?android:selectableItemBackground"/> \ No newline at end of file