summaryrefslogtreecommitdiff
path: root/java/com/android/newbubble/NewCheckableButton.java
diff options
context:
space:
mode:
authoryueg <yueg@google.com>2017-11-01 16:22:28 -0700
committerzachh <zachh@google.com>2017-11-10 23:40:48 +0000
commit84ac49babc81c94357706c5073fdb89f27b5fdbd (patch)
tree4e92d59fcb444de033bc359928e2fce120118adb /java/com/android/newbubble/NewCheckableButton.java
parent65e19075682f3c0cdaca367138560d80ac4a3106 (diff)
Implement some UI changes.
Including: - merge end call button with other buttons - add ripple effect for buttons - adjust elevation according to material design guide - add triangle in expanded view Bug: 67605985 Test: manual PiperOrigin-RevId: 174253861 Change-Id: I7b5315245a322235efb39a9cda26b8686cc7bbf9
Diffstat (limited to 'java/com/android/newbubble/NewCheckableButton.java')
-rw-r--r--java/com/android/newbubble/NewCheckableButton.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/java/com/android/newbubble/NewCheckableButton.java b/java/com/android/newbubble/NewCheckableButton.java
index 63525a4a1..8e43335ca 100644
--- a/java/com/android/newbubble/NewCheckableButton.java
+++ b/java/com/android/newbubble/NewCheckableButton.java
@@ -17,6 +17,7 @@
package com.android.newbubble;
import android.content.Context;
+import android.content.res.ColorStateList;
import android.support.v4.view.AccessibilityDelegateCompat;
import android.support.v4.view.ViewCompat;
import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat;
@@ -68,10 +69,12 @@ public class NewCheckableButton extends AppCompatButton implements Checkable {
public void setChecked(boolean checked) {
if (mChecked != checked) {
mChecked = checked;
- setTextColor(
+ int newColor =
checked
- ? getContext().getColor(R.color.bubble_button_text_color_blue)
- : getContext().getColor(R.color.bubble_button_text_color_black));
+ ? getContext().getColor(R.color.bubble_button_color_blue)
+ : getContext().getColor(R.color.bubble_button_color_grey);
+ setTextColor(newColor);
+ setCompoundDrawableTintList(ColorStateList.valueOf(newColor));
}
}