Unify data/power layout, confirm disable, round.
Share consistent layout between data usage and battery usage. Show confirmation dialog before disabling mobile data. Round warning/limit sweep values to match displayed label. Suppress fade when switching data usage tabs. Bug: 5208510, 5058157, 5038589, 5252816 Change-Id: I3c76f3397445d2d3b173666a41672871df4c61af
This commit is contained in:
@@ -67,6 +67,7 @@ public class ChartSweepView extends View {
|
||||
|
||||
private ChartAxis mAxis;
|
||||
private long mValue;
|
||||
private long mLabelValue;
|
||||
|
||||
private long mValidAfter;
|
||||
private long mValidBefore;
|
||||
@@ -226,7 +227,7 @@ public class ChartSweepView extends View {
|
||||
|
||||
private void invalidateLabel() {
|
||||
if (mLabelTemplate != null && mAxis != null) {
|
||||
mAxis.buildLabel(getResources(), mLabelTemplate, mValue);
|
||||
mLabelValue = mAxis.buildLabel(getResources(), mLabelTemplate, mValue);
|
||||
invalidate();
|
||||
}
|
||||
}
|
||||
@@ -265,6 +266,10 @@ public class ChartSweepView extends View {
|
||||
return mValue;
|
||||
}
|
||||
|
||||
public long getLabelValue() {
|
||||
return mLabelValue;
|
||||
}
|
||||
|
||||
public float getPoint() {
|
||||
if (isEnabled()) {
|
||||
return mAxis.convertToPoint(mValue);
|
||||
|
Reference in New Issue
Block a user