summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/volume/SegmentedButtons.java
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2015-04-29 14:02:49 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-04-29 14:02:52 +0000
commit8dbcda1b33ad9cd1c19052a332404cc221da42ee (patch)
tree4911498ab74a439549f51af84a1adca848f72dbe /packages/SystemUI/src/com/android/systemui/volume/SegmentedButtons.java
parent1c4a44e577c7b8316172d1bf5357d006776ae75e (diff)
parentd9c75dba75ad4742dbaadc34db99d2b76cebca91 (diff)
downloadframeworks_base-8dbcda1b33ad9cd1c19052a332404cc221da42ee.zip
frameworks_base-8dbcda1b33ad9cd1c19052a332404cc221da42ee.tar.gz
frameworks_base-8dbcda1b33ad9cd1c19052a332404cc221da42ee.tar.bz2
Merge "Volume: Simple dialog footer, DND in quick settings." into mnc-dev
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/volume/SegmentedButtons.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/SegmentedButtons.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/volume/SegmentedButtons.java b/packages/SystemUI/src/com/android/systemui/volume/SegmentedButtons.java
index 4f20ac7..f7cb9fe 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/SegmentedButtons.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/SegmentedButtons.java
@@ -17,6 +17,7 @@
package com.android.systemui.volume;
import android.content.Context;
+import android.graphics.Typeface;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
@@ -30,6 +31,8 @@ import java.util.Objects;
public class SegmentedButtons extends LinearLayout {
private static final int LABEL_RES_KEY = R.id.label;
+ private static final Typeface REGULAR = Typeface.create("sans-serif", Typeface.NORMAL);
+ private static final Typeface MEDIUM = Typeface.create("sans-serif-medium", Typeface.NORMAL);
private final Context mContext;
private final LayoutInflater mInflater;
@@ -60,6 +63,7 @@ public class SegmentedButtons extends LinearLayout {
final Object tag = c.getTag();
final boolean selected = Objects.equals(mSelectedValue, tag);
c.setSelected(selected);
+ c.setTypeface(selected ? MEDIUM : REGULAR);
}
fireOnSelected();
}