Back to project page rebudget.
The source code is released under:
Copyright (c) 2012, Alexander Lopatin All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are me...
If you think the Android project rebudget listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.sbar.rebudget.activities; //from w w w .j a v a 2 s . c o m import android.app.Activity; import android.database.Cursor; import android.os.Bundle; import android.widget.LinearLayout; import android.widget.ScrollView; import android.widget.TextView; import com.sbar.rebudget.Common; import com.sbar.rebudget.R; import com.sbar.rebudget.views.ChartView; public class PlansActivity extends Activity { LinearLayout m_layout = null; ChartView m_chartView = null; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.plans); ScrollView scrollView = (ScrollView) findViewById(R.id.chart_scrollview); m_chartView = new ChartView(this); updateChartView(); scrollView.addView(m_chartView); } public void updateChartView() { Cursor c = MainTabActivity.s_dc.selectCategories(); if (c.moveToFirst()) { do { m_chartView.addPiece( c.getString(0), c.getInt(1), c.getFloat(2), c.getFloat(3) ); } while (c.moveToNext()); m_chartView.sortPieces(); } else { if (MainTabActivity.s_dc.addDefaultCategories()) updateChartView(); else Common.LOGE("failed to create default categories"); } } }