diff options
author | Andrew Lee <anwlee@google.com> | 2015-10-16 18:03:05 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2015-10-19 11:35:05 -0700 |
commit | c5d0b86e670e8a0c58d07e73310881f8a9c49659 (patch) | |
tree | 860a768dc30bc93877449a9d1d8a6f1b27d504af /src/com | |
parent | fd7dd10a7edc30618c5854f1408250a1b0b40c16 (diff) |
Set snackbar action text to blue.
Done for both snackbars in call blocking/unblocking and voicemail
deletion.
Bug: 24370325
Change-Id: I00fdebb635e60ac1d421ccf7f15df46693773870
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/dialer/filterednumber/FilterNumberDialogFragment.java | 8 | ||||
-rw-r--r-- | src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/dialer/filterednumber/FilterNumberDialogFragment.java b/src/com/android/dialer/filterednumber/FilterNumberDialogFragment.java index 1e5294cc1..ebf212f0e 100644 --- a/src/com/android/dialer/filterednumber/FilterNumberDialogFragment.java +++ b/src/com/android/dialer/filterednumber/FilterNumberDialogFragment.java @@ -156,10 +156,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 @@ -184,6 +189,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) { @@ -203,6 +209,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 @@ -227,6 +234,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(); } }; |