Java Code Examples for com.android.settings.widget.ChartDataUsageView

Following code examples demonstrate how to use com.android.settings.widget.ChartDataUsageViewfrom android. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use com.android.settings.widget.ChartDataUsageViewand various code implementation of this class.

    public long getInspectStart() {
        if (mChartDataUsageView != null) {
            return mChartDataUsageView.getInspectStart();
        } else {
            return mInspectStart;
        }
    } 


    public long getInspectRight() {
        if (mChartDataUsageView != null) {
            return mChartDataUsageView.getInspectRight();
        } else {
            return mSelectRight;
        }
    } 

    public long getInspectEnd() {
        if (mChartDataUsageView != null) {
            return mChartDataUsageView.getInspectEnd();
        } else {
            return mInspectEnd;
        }
    } 

    public long getInspectLeft() {
        if (mChartDataUsageView != null) {
            return mChartDataUsageView.getInspectLeft();
        } else {
            return mSelectLeft;
        }
    } 

    private void updateChart() {
        mChartDataUsageView.setListener(mChartListener);
        mChartDataUsageView.bindNetworkPolicy(mPolicy);
        mChartDataUsageView.bindNetworkStats(mNetwork);
        mChartDataUsageView.bindDetailNetworkStats(mDetail);
        mChartDataUsageView.setVisibleRange(mInspectStart, mInspectEnd, mSelectLeft, mSelectRight);

        boolean isVisible = BillingCycleSettings.isShowDataUsage(mContext);
        int visible = isVisible ? View.VISIBLE : View.GONE;
        mChartDataUsageView.setDateSelectionSweepVisible(visible);
    } 

Advertisement
Javadoc
Specific ChartView that displays ChartNetworkSeriesView along with ChartSweepView for inspection ran

ges and warning/limits.

Read More
Advertisement