diff options
author | yueg <yueg@google.com> | 2018-06-08 17:02:21 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-08 17:06:42 -0700 |
commit | 72fdb6c67fac0ef31e8422a6ebae8c7cdb3fe025 (patch) | |
tree | 6b3ad83033c1245c16ab5a1a00344bb21c4496cd /java | |
parent | 2f5fc8a9f8439b87a9ebd01864c0395810992539 (diff) |
Fix incall icon arrow color
Test: manual
PiperOrigin-RevId: 199872562
Change-Id: I77e7ff7587f05c4c251ba8e55e43f32730cdc3c4
Diffstat (limited to 'java')
-rw-r--r-- | java/com/android/incallui/incall/impl/CheckableLabeledButton.java | 12 | ||||
-rw-r--r-- | java/com/android/incallui/incall/impl/res/color/incall_button_icon.xml | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/java/com/android/incallui/incall/impl/CheckableLabeledButton.java b/java/com/android/incallui/incall/impl/CheckableLabeledButton.java index 03e6e3700..bfc2781a9 100644 --- a/java/com/android/incallui/incall/impl/CheckableLabeledButton.java +++ b/java/com/android/incallui/incall/impl/CheckableLabeledButton.java @@ -67,8 +67,10 @@ public class CheckableLabeledButton extends LinearLayout implements Checkable { CharSequence labelText; boolean enabled; - backgroundMore = getResources().getDrawable(R.drawable.incall_button_background_more, null); - background = getResources().getDrawable(R.drawable.incall_button_background, null); + backgroundMore = + getResources().getDrawable(R.drawable.incall_button_background_more, context.getTheme()); + background = + getResources().getDrawable(R.drawable.incall_button_background, context.getTheme()); TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.CheckableLabeledButton); @@ -92,9 +94,11 @@ public class CheckableLabeledButton extends LinearLayout implements Checkable { iconView.setPadding(iconPadding, iconPadding, iconPadding, iconPadding); iconView.setImageDrawable(icon); iconView.setImageTintMode(Mode.SRC_IN); - iconView.setImageTintList(getResources().getColorStateList(R.color.incall_button_icon, null)); + iconView.setImageTintList( + getResources().getColorStateList(R.color.incall_button_icon, context.getTheme())); - iconView.setBackground(getResources().getDrawable(R.drawable.incall_button_background, null)); + iconView.setBackground( + getResources().getDrawable(R.drawable.incall_button_background, context.getTheme())); iconView.setDuplicateParentStateEnabled(true); iconView.setElevation(getResources().getDimension(R.dimen.incall_button_elevation)); iconView.setStateListAnimator( diff --git a/java/com/android/incallui/incall/impl/res/color/incall_button_icon.xml b/java/com/android/incallui/incall/impl/res/color/incall_button_icon.xml index 68b34c89d..000525f5f 100644 --- a/java/com/android/incallui/incall/impl/res/color/incall_button_icon.xml +++ b/java/com/android/incallui/incall/impl/res/color/incall_button_icon.xml @@ -17,5 +17,5 @@ <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:color="?android:attr/colorPrimaryDark" android:state_checked="true"/> - <item android:color="?android:attr/colorBackgroundFloating"/> + <item android:color="?android:attr/textColorPrimary"/> </selector> |