diff options
author | calderwoodra <calderwoodra@google.com> | 2017-11-20 22:46:00 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-11-20 22:46:00 +0000 |
commit | 3a43f1a412a9fe814cbd82e9ef91006c4f837bae (patch) | |
tree | 87c18b0b3343a67ae2075cab94cf21b410859a87 /java | |
parent | 1f67ee561455aa733e36ba3c824367f70089ec6a (diff) | |
parent | 861bb9d4402c1b9ee68e9382570f0fca3783478e (diff) |
Merge "Dialpad icon now remains white through device rotation."
am: 861bb9d440
Change-Id: I0b3c3f2bc10cdd843b223aa4a72e1a5377071847
Diffstat (limited to 'java')
-rw-r--r-- | java/com/android/dialer/dialpadview/DialpadFragment.java | 2 | ||||
-rw-r--r-- | java/com/android/dialer/widget/FloatingActionButtonController.java | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/java/com/android/dialer/dialpadview/DialpadFragment.java b/java/com/android/dialer/dialpadview/DialpadFragment.java index 8d11bcbe3..4126443bc 100644 --- a/java/com/android/dialer/dialpadview/DialpadFragment.java +++ b/java/com/android/dialer/dialpadview/DialpadFragment.java @@ -643,7 +643,7 @@ public class DialpadFragment extends Fragment iconId = R.drawable.ic_wifi_calling; } mFloatingActionButtonController.changeIcon( - iconId, res.getString(R.string.description_dial_button)); + getContext(), iconId, res.getString(R.string.description_dial_button)); mDialpadQueryListener = FragmentUtils.getParentUnsafe(this, OnDialpadQueryChangedListener.class); diff --git a/java/com/android/dialer/widget/FloatingActionButtonController.java b/java/com/android/dialer/widget/FloatingActionButtonController.java index dde4d44ce..1f9923dca 100644 --- a/java/com/android/dialer/widget/FloatingActionButtonController.java +++ b/java/com/android/dialer/widget/FloatingActionButtonController.java @@ -17,6 +17,8 @@ package com.android.dialer.widget; import android.app.Activity; +import android.content.Context; +import android.content.res.ColorStateList; import android.content.res.Resources; import android.support.annotation.DrawableRes; import android.support.design.widget.FloatingActionButton; @@ -83,9 +85,11 @@ public class FloatingActionButtonController { } } - public void changeIcon(@DrawableRes int iconId, String description) { + public void changeIcon(Context context, @DrawableRes int iconId, String description) { if (this.mFabIconId != iconId) { mFab.setImageResource(iconId); + mFab.setImageTintList( + ColorStateList.valueOf(context.getResources().getColor(android.R.color.white))); this.mFabIconId = iconId; } if (!mFab.getContentDescription().equals(description)) { |