Data Usage, materialized!
Asset drop so Data Usage matches new Material spec. Removes time dimension sweeps, so we now summarize the entire visible axis. Fix time axis labels to not draw outside clip bounds. Remove pie chart. No more checkboxes in menus. Telephony items like roaming are moved back to cellular settings. Start wiring up multi-SIM support. Bug: 15760500, 16019700, 16289924, 16303795 Change-Id: Ie8f4821962319bb82ff4bc2f13f1f66ba1bdfe65
This commit is contained in:
@@ -58,6 +58,7 @@ public class ChartSweepView extends View {
|
||||
|
||||
private Rect mMargins = new Rect();
|
||||
private float mNeighborMargin;
|
||||
private int mSafeRegion;
|
||||
|
||||
private int mFollowAxis;
|
||||
|
||||
@@ -125,6 +126,7 @@ public class ChartSweepView extends View {
|
||||
setSweepDrawable(a.getDrawable(R.styleable.ChartSweepView_sweepDrawable));
|
||||
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));
|
||||
@@ -259,7 +261,6 @@ public class ChartSweepView extends View {
|
||||
paint.density = getResources().getDisplayMetrics().density;
|
||||
paint.setCompatibilityScaling(getResources().getCompatibilityInfo().applicationScale);
|
||||
paint.setColor(mLabelColor);
|
||||
paint.setShadowLayer(4 * paint.density, 0, 0, Color.BLACK);
|
||||
|
||||
mLabelTemplate = new SpannableStringBuilder(template);
|
||||
mLabelLayout = new DynamicLayout(
|
||||
@@ -383,6 +384,10 @@ public class ChartSweepView extends View {
|
||||
mNeighborMargin = neighborMargin;
|
||||
}
|
||||
|
||||
public void setSafeRegion(int safeRegion) {
|
||||
mSafeRegion = safeRegion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set valid range this sweep can move within, defined by the given
|
||||
* {@link ChartSweepView}. The most restrictive combination of all valid
|
||||
@@ -709,7 +714,7 @@ public class ChartSweepView extends View {
|
||||
mLabelLayout.draw(canvas);
|
||||
}
|
||||
canvas.restoreToCount(count);
|
||||
labelSize = (int) mLabelSize;
|
||||
labelSize = (int) mLabelSize + mSafeRegion;
|
||||
} else {
|
||||
labelSize = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user