diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-11-20 22:33:03 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-11-20 22:33:03 +0000 |
commit | 861bb9d4402c1b9ee68e9382570f0fca3783478e (patch) | |
tree | 87c18b0b3343a67ae2075cab94cf21b410859a87 /java/com/android/dialer/widget/FloatingActionButtonController.java | |
parent | 599205c0bfc0107f0d4043aa9582e21e3576dfa4 (diff) | |
parent | dad839d3ef89a8c58cb94eef7d282f34d86597b9 (diff) |
Merge "Dialpad icon now remains white through device rotation."
Diffstat (limited to 'java/com/android/dialer/widget/FloatingActionButtonController.java')
-rw-r--r-- | java/com/android/dialer/widget/FloatingActionButtonController.java | 6 |
1 files changed, 5 insertions, 1 deletions
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)) { |