Iterating on data usage; tabs, scrolling, cycles.
Added ActionBar items to control complexity of data surfaced; checked state causes tabs to be shown/hidden for "Mobile", "2G-3G", "4G", and "Wi-Fi" network templates. Loading historical stats and policy from system services based on selected tab. Change entire body under tabs to scroll, treating network options and chart as ListView headers. Teach chart sweep to disable intercept to play with ListView, and draw sweep disabled as dashed line. Hijacking Preference views for toggles to offer consistency. No policy updates are persisted yet. Based on available historical network stats and policy cycle reset day, build list of user-selectable cycles. Wired up chart to display cycle data and reset inspection region to last week of available data. Change-Id: Ia561578276fa23908b745fbc06a6ef828d9ccc2e
This commit is contained in:
@@ -35,7 +35,7 @@ import com.google.common.base.Preconditions;
|
||||
*/
|
||||
public class ChartNetworkSeriesView extends View {
|
||||
private static final String TAG = "ChartNetworkSeriesView";
|
||||
private static final boolean LOGD = false;
|
||||
private static final boolean LOGD = true;
|
||||
|
||||
private final ChartAxis mHoriz;
|
||||
private final ChartAxis mVert;
|
||||
@@ -80,6 +80,9 @@ public class ChartNetworkSeriesView extends View {
|
||||
|
||||
public void bindNetworkStats(NetworkStatsHistory stats) {
|
||||
mStats = stats;
|
||||
|
||||
mPathStroke.reset();
|
||||
mPathFill.reset();
|
||||
}
|
||||
|
||||
public void bindSweepRange(ChartSweepView sweep1, ChartSweepView sweep2) {
|
||||
@@ -99,7 +102,9 @@ public class ChartNetworkSeriesView extends View {
|
||||
* Erase any existing {@link Path} and generate series outline based on
|
||||
* currently bound {@link NetworkStatsHistory} data.
|
||||
*/
|
||||
private void generatePath() {
|
||||
public void generatePath() {
|
||||
if (LOGD) Log.d(TAG, "generatePath()");
|
||||
|
||||
mPathStroke.reset();
|
||||
mPathFill.reset();
|
||||
|
||||
@@ -114,6 +119,9 @@ public class ChartNetworkSeriesView extends View {
|
||||
float lastX = 0;
|
||||
float lastY = 0;
|
||||
|
||||
// TODO: count fractional data from first bucket crossing start;
|
||||
// currently it only accepts first full bucket.
|
||||
|
||||
long totalData = 0;
|
||||
|
||||
for (int i = 0; i < mStats.bucketCount; i++) {
|
||||
|
||||
Reference in New Issue
Block a user