diff options
author | Jason Monk <jmonk@google.com> | 2015-06-03 10:53:03 -0400 |
---|---|---|
committer | Jason Monk <jmonk@google.com> | 2015-06-04 14:16:10 -0400 |
commit | 2d499533b70072a914542b84e9cc8bdb8aca78d8 (patch) | |
tree | 30e83f7fc8401c96ba2400992c0bd3584026715b /src/com/android/settings/widget/ChartSweepView.java | |
parent | fb32790adc9ed647ad4e77c9613a860f9b76e855 (diff) | |
download | packages_apps_Settings-2d499533b70072a914542b84e9cc8bdb8aca78d8.zip packages_apps_Settings-2d499533b70072a914542b84e9cc8bdb8aca78d8.tar.gz packages_apps_Settings-2d499533b70072a914542b84e9cc8bdb8aca78d8.tar.bz2 |
Fix some dark theme issues (Take 2)
Now with visible lock patterns! Both light and dark!
Bug: 21117509
Bug: 21077345
Bug: 21480587
Bug: 21621900
Change-Id: Ibcf822faf7cbc83be43d757e0a6a9432ef3346af
Diffstat (limited to 'src/com/android/settings/widget/ChartSweepView.java')
-rw-r--r-- | src/com/android/settings/widget/ChartSweepView.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/settings/widget/ChartSweepView.java b/src/com/android/settings/widget/ChartSweepView.java index 04fc862..e8e24aa 100644 --- a/src/com/android/settings/widget/ChartSweepView.java +++ b/src/com/android/settings/widget/ChartSweepView.java @@ -123,14 +123,15 @@ public class ChartSweepView extends View { final TypedArray a = context.obtainStyledAttributes( attrs, R.styleable.ChartSweepView, defStyle, 0); - setSweepDrawable(a.getDrawable(R.styleable.ChartSweepView_sweepDrawable)); + final int color = a.getColor(R.styleable.ChartSweepView_labelColor, Color.BLUE); + setSweepDrawable(a.getDrawable(R.styleable.ChartSweepView_sweepDrawable), color); setFollowAxis(a.getInt(R.styleable.ChartSweepView_followAxis, -1)); setNeighborMargin(a.getDimensionPixelSize(R.styleable.ChartSweepView_neighborMargin, 0)); setSafeRegion(a.getDimensionPixelSize(R.styleable.ChartSweepView_safeRegion, 0)); setLabelMinSize(a.getDimensionPixelSize(R.styleable.ChartSweepView_labelSize, 0)); setLabelTemplate(a.getResourceId(R.styleable.ChartSweepView_labelTemplate, 0)); - setLabelColor(a.getColor(R.styleable.ChartSweepView_labelColor, Color.BLUE)); + setLabelColor(color); // TODO: moved focused state directly into assets setBackgroundResource(R.drawable.data_usage_sweep_background); @@ -213,7 +214,7 @@ public class ChartSweepView extends View { requestLayout(); } - public void setSweepDrawable(Drawable sweep) { + public void setSweepDrawable(Drawable sweep, int color) { if (mSweep != null) { mSweep.setCallback(null); unscheduleDrawable(mSweep); @@ -226,6 +227,8 @@ public class ChartSweepView extends View { } sweep.setVisible(getVisibility() == VISIBLE, false); mSweep = sweep; + // Match the text. + mSweep.setTint(color); sweep.getPadding(mSweepPadding); } else { mSweep = null; |