diff options
Diffstat (limited to 'src/com/android/settings/widget')
-rw-r--r-- | src/com/android/settings/widget/ChartNetworkSeriesView.java | 23 | ||||
-rw-r--r-- | src/com/android/settings/widget/DataUsageChartView.java | 7 |
2 files changed, 21 insertions, 9 deletions
diff --git a/src/com/android/settings/widget/ChartNetworkSeriesView.java b/src/com/android/settings/widget/ChartNetworkSeriesView.java index d0a2742..5fc79dd 100644 --- a/src/com/android/settings/widget/ChartNetworkSeriesView.java +++ b/src/com/android/settings/widget/ChartNetworkSeriesView.java @@ -40,9 +40,9 @@ public class ChartNetworkSeriesView extends View { private final ChartAxis mHoriz; private final ChartAxis mVert; - private final Paint mPaintStroke; - private final Paint mPaintFill; - private final Paint mPaintFillDisabled; + private Paint mPaintStroke; + private Paint mPaintFill; + private Paint mPaintFillDisabled; private NetworkStatsHistory mStats; @@ -58,24 +58,29 @@ public class ChartNetworkSeriesView extends View { mHoriz = Preconditions.checkNotNull(horiz, "missing horiz"); mVert = Preconditions.checkNotNull(vert, "missing vert"); + setChartColor(Color.parseColor("#24aae1"), Color.parseColor("#c050ade5"), + Color.parseColor("#88566abc")); + + mPathStroke = new Path(); + mPathFill = new Path(); + } + + public void setChartColor(int stroke, int fill, int disabled) { mPaintStroke = new Paint(); mPaintStroke.setStrokeWidth(6.0f); - mPaintStroke.setColor(Color.parseColor("#24aae1")); + mPaintStroke.setColor(stroke); mPaintStroke.setStyle(Style.STROKE); mPaintStroke.setAntiAlias(true); mPaintFill = new Paint(); - mPaintFill.setColor(Color.parseColor("#c050ade5")); + mPaintFill.setColor(fill); mPaintFill.setStyle(Style.FILL); mPaintFill.setAntiAlias(true); mPaintFillDisabled = new Paint(); - mPaintFillDisabled.setColor(Color.parseColor("#88566abc")); + mPaintFillDisabled.setColor(disabled); mPaintFillDisabled.setStyle(Style.FILL); mPaintFillDisabled.setAntiAlias(true); - - mPathStroke = new Path(); - mPathFill = new Path(); } public void bindNetworkStats(NetworkStatsHistory stats) { diff --git a/src/com/android/settings/widget/DataUsageChartView.java b/src/com/android/settings/widget/DataUsageChartView.java index 6a702d0..9dbffcd 100644 --- a/src/com/android/settings/widget/DataUsageChartView.java +++ b/src/com/android/settings/widget/DataUsageChartView.java @@ -86,6 +86,13 @@ public class DataUsageChartView extends ChartView { mSweepTime1.addOnSweepListener(mSweepListener); mSweepTime2.addOnSweepListener(mSweepListener); + mSweepDataWarn.setVisibility(View.INVISIBLE); + mSweepDataLimit.setVisibility(View.INVISIBLE); + + } + + public void setChartColor(int stroke, int fill, int disabled) { + mSeries.setChartColor(stroke, fill, disabled); } public void setListener(DataUsageChartListener listener) { |