diff options
Diffstat (limited to 'java/com/android/dialer/app')
30 files changed, 91 insertions, 175 deletions
diff --git a/java/com/android/dialer/app/calllog/CallLogGroupBuilder.java b/java/com/android/dialer/app/calllog/CallLogGroupBuilder.java index 26b3a6260..e52591174 100644 --- a/java/com/android/dialer/app/calllog/CallLogGroupBuilder.java +++ b/java/com/android/dialer/app/calllog/CallLogGroupBuilder.java @@ -18,6 +18,7 @@ package com.android.dialer.app.calllog; import android.content.Context; import android.database.Cursor; +import android.provider.CallLog.Calls; import android.support.annotation.Nullable; import android.support.annotation.VisibleForTesting; import android.telephony.PhoneNumberUtils; @@ -26,7 +27,6 @@ import android.text.format.Time; import com.android.contacts.common.util.DateUtils; import com.android.dialer.calllogutils.CallbackActionHelper; import com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction; -import com.android.dialer.compat.AppCompatConstants; import com.android.dialer.compat.telephony.TelephonyManagerCompat; import com.android.dialer.inject.ApplicationContext; import com.android.dialer.phonenumbercache.CallLogQuery; @@ -267,18 +267,15 @@ public class CallLogGroupBuilder { } private boolean areBothNotVoicemail(int callType, int groupCallType) { - return callType != AppCompatConstants.CALLS_VOICEMAIL_TYPE - && groupCallType != AppCompatConstants.CALLS_VOICEMAIL_TYPE; + return callType != Calls.VOICEMAIL_TYPE && groupCallType != Calls.VOICEMAIL_TYPE; } private boolean areBothNotBlocked(int callType, int groupCallType) { - return callType != AppCompatConstants.CALLS_BLOCKED_TYPE - && groupCallType != AppCompatConstants.CALLS_BLOCKED_TYPE; + return callType != Calls.BLOCKED_TYPE && groupCallType != Calls.BLOCKED_TYPE; } private boolean areBothBlocked(int callType, int groupCallType) { - return callType == AppCompatConstants.CALLS_BLOCKED_TYPE - && groupCallType == AppCompatConstants.CALLS_BLOCKED_TYPE; + return callType == Calls.BLOCKED_TYPE && groupCallType == Calls.BLOCKED_TYPE; } private boolean meetsAssistedDialingGroupingCriteria(int groupFeatures, int callFeatures) { diff --git a/java/com/android/dialer/app/calllog/CallLogListItemHelper.java b/java/com/android/dialer/app/calllog/CallLogListItemHelper.java index 13ee9a41f..a30d4d76e 100644 --- a/java/com/android/dialer/app/calllog/CallLogListItemHelper.java +++ b/java/com/android/dialer/app/calllog/CallLogListItemHelper.java @@ -26,7 +26,6 @@ import com.android.dialer.app.calllog.calllogcache.CallLogCache; import com.android.dialer.calllogutils.PhoneCallDetails; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; -import com.android.dialer.compat.AppCompatConstants; /** Helper class to fill in the views of a call log entry. */ /* package */ class CallLogListItemHelper { @@ -224,15 +223,15 @@ import com.android.dialer.compat.AppCompatConstants; int lastCallType = getLastCallType(callTypes); int stringID; - if (lastCallType == AppCompatConstants.CALLS_MISSED_TYPE) { + if (lastCallType == Calls.MISSED_TYPE) { //Message: Missed call from <NameOrNumber>, <TypeOrLocation>, <TimeOfCall>, //<PhoneAccount>. stringID = R.string.description_incoming_missed_call; - } else if (lastCallType == AppCompatConstants.CALLS_INCOMING_TYPE) { + } else if (lastCallType == Calls.INCOMING_TYPE) { //Message: Answered call from <NameOrNumber>, <TypeOrLocation>, <TimeOfCall>, //<PhoneAccount>. stringID = R.string.description_incoming_answered_call; - } else if (lastCallType == AppCompatConstants.CALLS_VOICEMAIL_TYPE) { + } else if (lastCallType == Calls.VOICEMAIL_TYPE) { //Message: (Unread) [V/v]oicemail from <NameOrNumber>, <TypeOrLocation>, <TimeOfCall>, //<PhoneAccount>. stringID = diff --git a/java/com/android/dialer/app/calllog/LegacyVoicemailNotifier.java b/java/com/android/dialer/app/calllog/LegacyVoicemailNotifier.java index f142399d7..ccf12ae12 100644 --- a/java/com/android/dialer/app/calllog/LegacyVoicemailNotifier.java +++ b/java/com/android/dialer/app/calllog/LegacyVoicemailNotifier.java @@ -37,6 +37,7 @@ import com.android.dialer.notification.DialerNotificationManager; import com.android.dialer.notification.NotificationChannelManager; import com.android.dialer.phonenumberutil.PhoneNumberHelper; import com.android.dialer.telecom.TelecomUtil; +import com.android.dialer.theme.base.ThemeComponent; /** Shows a notification in the status bar for legacy vociemail. */ @TargetApi(VERSION_CODES.O) @@ -115,7 +116,7 @@ public final class LegacyVoicemailNotifier { Notification.Builder builder = new Notification.Builder(context) .setSmallIcon(android.R.drawable.stat_notify_voicemail) - .setColor(context.getColor(R.color.dialer_theme_color)) + .setColor(ThemeComponent.get(context).theme().getColorPrimary()) .setWhen(System.currentTimeMillis()) .setContentTitle(notificationTitle) .setContentText(contentText) diff --git a/java/com/android/dialer/app/calllog/MissedCallNotifier.java b/java/com/android/dialer/app/calllog/MissedCallNotifier.java index f671fb7fd..4b5bfba8a 100644 --- a/java/com/android/dialer/app/calllog/MissedCallNotifier.java +++ b/java/com/android/dialer/app/calllog/MissedCallNotifier.java @@ -62,6 +62,7 @@ import com.android.dialer.notification.missedcalls.MissedCallNotificationTags; import com.android.dialer.phonenumbercache.ContactInfo; import com.android.dialer.phonenumberutil.PhoneNumberHelper; import com.android.dialer.precall.PreCall; +import com.android.dialer.theme.base.ThemeComponent; import com.android.dialer.util.DialerUtils; import com.android.dialer.util.IntentUtil; import java.util.Iterator; @@ -396,7 +397,7 @@ public class MissedCallNotifier implements Worker<Pair<Integer, String>, Void> { return new Notification.Builder(context) .setGroup(MissedCallConstants.GROUP_KEY) .setSmallIcon(android.R.drawable.stat_notify_missed_call) - .setColor(context.getResources().getColor(R.color.dialer_theme_color, null)) + .setColor(ThemeComponent.get(context).theme().getColorPrimary()) .setAutoCancel(true) .setOnlyAlertOnce(true) .setShowWhen(true) diff --git a/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java b/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java index 230c02328..2632fb380 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.ThemeComponent; import com.android.dialer.util.DialerUtils; import com.android.voicemail.VoicemailClient; import com.android.voicemail.VoicemailComponent; @@ -269,9 +270,9 @@ 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 + ? ThemeComponent.get(context).theme().getTextColorSecondary() + : ThemeComponent.get(context).theme().getTextColorPrimary()); } private void setNameView(PhoneCallDetailsViews views, PhoneCallDetails details) { @@ -392,17 +393,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(ThemeComponent.get(context).theme().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(ThemeComponent.get(context).theme().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/calllog/VisualVoicemailNotifier.java b/java/com/android/dialer/app/calllog/VisualVoicemailNotifier.java index 793d9627c..a29bb62da 100644 --- a/java/com/android/dialer/app/calllog/VisualVoicemailNotifier.java +++ b/java/com/android/dialer/app/calllog/VisualVoicemailNotifier.java @@ -47,6 +47,7 @@ import com.android.dialer.notification.NotificationChannelManager; import com.android.dialer.notification.NotificationManagerUtils; import com.android.dialer.phonenumbercache.ContactInfo; import com.android.dialer.telecom.TelecomUtil; +import com.android.dialer.theme.base.ThemeComponent; import java.util.List; import java.util.Map; @@ -144,7 +145,7 @@ final class VisualVoicemailNotifier { private static NotificationCompat.Builder createNotificationBuilder(@NonNull Context context) { return new NotificationCompat.Builder(context) .setSmallIcon(android.R.drawable.stat_notify_voicemail) - .setColor(context.getColor(R.color.dialer_theme_color)) + .setColor(ThemeComponent.get(context).theme().getColorPrimary()) .setGroup(GROUP_KEY) .setOnlyAlertOnce(true) .setAutoCancel(true); diff --git a/java/com/android/dialer/app/filterednumber/BlockedNumbersFragment.java b/java/com/android/dialer/app/filterednumber/BlockedNumbersFragment.java index 270ec6d03..bf40fdf3a 100644 --- a/java/com/android/dialer/app/filterednumber/BlockedNumbersFragment.java +++ b/java/com/android/dialer/app/filterednumber/BlockedNumbersFragment.java @@ -23,7 +23,6 @@ import android.content.Loader; import android.database.Cursor; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; -import android.support.v4.app.ActivityCompat; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.view.LayoutInflater; @@ -39,6 +38,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.ThemeComponent; import com.android.dialer.voicemailstatus.VisualVoicemailEnabledChecker; /** TODO(calderwoodra): documentation */ @@ -74,8 +74,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(ThemeComponent.get(getContext()).theme().getColorIcon()); drawable.setIsCircular(true); if (adapter == null) { @@ -119,7 +118,7 @@ public class BlockedNumbersFragment extends ListFragment ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar(); ColorDrawable backgroundDrawable = - new ColorDrawable(ActivityCompat.getColor(getActivity(), R.color.dialer_theme_color)); + new ColorDrawable(ThemeComponent.get(getContext()).theme().getColorPrimary()); actionBar.setBackgroundDrawable(backgroundDrawable); actionBar.setDisplayShowCustomEnabled(false); actionBar.setDisplayHomeAsUpEnabled(true); 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> |