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:
Jeff Sharkey
2011-06-10 13:31:21 -07:00
parent 86432504d3
commit 8a50364a71
12 changed files with 1000 additions and 224 deletions

View File

@@ -22,6 +22,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
import android.content.Context;
import android.graphics.Rect;
import android.util.Log;
import android.view.Gravity;
import android.view.View;
import android.widget.FrameLayout;
@@ -37,8 +38,8 @@ public class ChartView extends FrameLayout {
// TODO: extend something that supports two-dimensional scrolling
private final ChartAxis mHoriz;
private final ChartAxis mVert;
final ChartAxis mHoriz;
final ChartAxis mVert;
private Rect mContent = new Rect();
@@ -54,8 +55,8 @@ public class ChartView extends FrameLayout {
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
mContent.set(l + getPaddingLeft(), t + getPaddingTop(), r - getPaddingRight(),
b - getPaddingBottom());
mContent.set(getPaddingLeft(), getPaddingTop(), r - l - getPaddingRight(),
b - t - getPaddingBottom());
final int width = mContent.width();
final int height = mContent.height();