diff options
author | Andrew Lee <anwlee@google.com> | 2015-10-20 23:24:19 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-10-20 23:24:19 +0000 |
commit | a1aa3829d003a75f28a1e8aac04cef407e12de7b (patch) | |
tree | e994a132e3b1c4b9f054de00906e7a5ed0c332f9 | |
parent | b2ae1410907a622c59175f821d07d3c936b2882c (diff) | |
parent | c5d0b86e670e8a0c58d07e73310881f8a9c49659 (diff) |
Merge "Set snackbar action text to blue." into ub-contactsdialer-a-dev
-rw-r--r-- | res/values/colors.xml | 1 | ||||
-rw-r--r-- | src/com/android/dialer/filterednumber/FilterNumberDialogFragment.java | 8 | ||||
-rw-r--r-- | src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java | 3 |
3 files changed, 12 insertions, 0 deletions
diff --git a/res/values/colors.xml b/res/values/colors.xml index 8b7b1502f..bf7bfb235 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -24,6 +24,7 @@ <color name="dialer_button_text_color">#fff</color> <color name="dialer_flat_button_text_color">@color/dialer_theme_color</color> + <color name="dialer_snackbar_action_text_color">@color/dialer_theme_color</color> <!-- Color for the setting text. --> <color name="setting_primary_color">@color/dialtacts_primary_text_color</color> diff --git a/src/com/android/dialer/filterednumber/FilterNumberDialogFragment.java b/src/com/android/dialer/filterednumber/FilterNumberDialogFragment.java index affb37b15..8473e324a 100644 --- a/src/com/android/dialer/filterednumber/FilterNumberDialogFragment.java +++ b/src/com/android/dialer/filterednumber/FilterNumberDialogFragment.java @@ -178,10 +178,15 @@ public class FilterNumberDialogFragment extends DialogFragment { return getString(R.string.snackbar_number_unblocked, mDisplayNumber); } + private int getActionTextColor() { + return getContext().getResources().getColor(R.color.dialer_snackbar_action_text_color); + } + private void blockNumber() { final String message = getBlockedMessage(); final String undoMessage = getUnblockedMessage(); final Callback callback = mCallback; + final int actionTextColor = getActionTextColor(); final OnUnblockNumberListener onUndoListener = new OnUnblockNumberListener() { @Override @@ -206,6 +211,7 @@ public class FilterNumberDialogFragment extends DialogFragment { Snackbar.make(mParentView, message, Snackbar.LENGTH_LONG) .setAction(R.string.block_number_undo, undoListener) + .setActionTextColor(actionTextColor) .show(); if (callback != null) { @@ -225,6 +231,7 @@ public class FilterNumberDialogFragment extends DialogFragment { final String message = getUnblockedMessage(); final String undoMessage = getBlockedMessage(); final Callback callback = mCallback; + final int actionTextColor = getActionTextColor(); final OnBlockNumberListener onUndoListener = new OnBlockNumberListener() { @Override @@ -249,6 +256,7 @@ public class FilterNumberDialogFragment extends DialogFragment { Snackbar.make(mParentView, message, Snackbar.LENGTH_LONG) .setAction(R.string.block_number_undo, undoListener) + .setActionTextColor(actionTextColor) .show(); if (callback != null) { diff --git a/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java b/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java index f86fc5539..33210d358 100644 --- a/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java +++ b/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java @@ -209,6 +209,8 @@ public class VoicemailPlaybackLayout extends LinearLayout // window. handler.postDelayed(deleteCallback, VOICEMAIL_DELETE_DELAY_MS + 50); + final int actionTextColor = + mContext.getResources().getColor(R.color.dialer_snackbar_action_text_color); Snackbar.make(VoicemailPlaybackLayout.this, R.string.snackbar_voicemail_deleted, Snackbar.LENGTH_LONG) .setDuration(VOICEMAIL_DELETE_DELAY_MS) @@ -220,6 +222,7 @@ public class VoicemailPlaybackLayout extends LinearLayout handler.removeCallbacks(deleteCallback); } }) + .setActionTextColor(actionTextColor) .show(); } }; |