diff options
| author | Julia Reynolds <juliacr@google.com> | 2016-05-26 17:36:52 +0000 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2016-05-26 17:36:52 +0000 |
| commit | 901bdeadef9c293c093e7902b414734b9c63ac2c (patch) | |
| tree | 8848644f5325c4a58ec73237c8be9cc4c1b5b0a2 | |
| parent | 6843da1aa8da6374dde23ef20bad2abfed6aaba2 (diff) | |
| parent | 2bf73e94c389bf9457df132d6eaf294f9d35587f (diff) | |
Merge "Importance slider updates." into nyc-dev
am: 2bf73e94c3
* commit '2bf73e94c389bf9457df132d6eaf294f9d35587f':
Importance slider updates.
Change-Id: I26df0b8c0aa02cba63b485b85845cfc631416cd8
| -rw-r--r-- | packages/SettingsLib/res/drawable/notification_auto_importance.xml | 4 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java | 13 |
2 files changed, 12 insertions, 5 deletions
diff --git a/packages/SettingsLib/res/drawable/notification_auto_importance.xml b/packages/SettingsLib/res/drawable/notification_auto_importance.xml index a63e911b9ffc..c94615312306 100644 --- a/packages/SettingsLib/res/drawable/notification_auto_importance.xml +++ b/packages/SettingsLib/res/drawable/notification_auto_importance.xml @@ -20,8 +20,8 @@ android:viewportHeight="24.0"> <path android:fillColor="#FFFFFFFF" - android:pathData="M11.2,13.6l1.6,0l-0.8,-2.6z"/> + android:pathData="M10.8,12.7l2.4,0l-1.2,-3.7z"/> <path android:fillColor="#FF000000" - android:pathData="M22.5,9.6L15,9l-3,-7L9,9L1.5,9.6l5.7,5L5.5,22l6.5,-3.9l6.5,3.9l-1.7,-7.4L22.5,9.6zM13.6,16l-0.5,-1.4h-2.3L10.4,16H9l2.3,-6.4h1.4L15,16H13.6z"/> + android:pathData="M12,2C6.5,2 2,6.5 2,12s4.5,10 10,10s10,-4.5 10,-10S17.5,2 12,2zM14.3,16l-0.7,-2h-3.2l-0.7,2H7.8L11,7h2l3.2,9H14.3z"/> </vector>
\ No newline at end of file diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java index 4650a1f090ed..b523a112c209 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java @@ -23,6 +23,7 @@ import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.res.ColorStateList; +import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.os.Handler; @@ -70,6 +71,8 @@ public class NotificationGuts extends LinearLayout implements TunerService.Tunab private ImageView mAutoButton; private ColorStateList mActiveSliderTint; private ColorStateList mInactiveSliderTint; + private float mActiveSliderAlpha = 1.0f; + private float mInactiveSliderAlpha; private TextView mImportanceSummary; private TextView mImportanceTitle; private boolean mAuto; @@ -100,6 +103,11 @@ public class NotificationGuts extends LinearLayout implements TunerService.Tunab } } }; + final TypedArray ta = + context.obtainStyledAttributes(attrs, com.android.internal.R.styleable.Theme, 0, 0); + mInactiveSliderAlpha = + ta.getFloat(com.android.internal.R.styleable.Theme_disabledAlpha, 0.5f); + ta.recycle(); } public void resetFalsingCheck() { @@ -299,13 +307,12 @@ public class NotificationGuts extends LinearLayout implements TunerService.Tunab private void applyAuto() { mSeekBar.setEnabled(!mAuto); - final ColorStateList sliderTint = mAuto ? mInactiveSliderTint : mActiveSliderTint; final ColorStateList starTint = mAuto ? mActiveSliderTint : mInactiveSliderTint; + final float alpha = mAuto ? mInactiveSliderAlpha : mActiveSliderAlpha; Drawable icon = mAutoButton.getDrawable().mutate(); icon.setTintList(starTint); mAutoButton.setImageDrawable(icon); - mSeekBar.setProgressTintList(sliderTint); - mSeekBar.setThumbTintList(sliderTint); + mSeekBar.setAlpha(alpha); if (mAuto) { mSeekBar.setProgress(mNotificationImportance); |
