¡@

Home 

2014/10/16 ¤W¤È 08:20:58

android Programming Glossary: overlimitdbadapter

keeping a variable value across all android activities

http://stackoverflow.com/questions/8573796/keeping-a-variable-value-across-all-android-activities

I can send the value of the cursor row id to Profile class public class Overthelimit extends ListActivity private OverLimitDbAdapter dbHelper private Cursor cursor Called when the activity is first created. @Override public void onCreate Bundle savedInstanceState.. Bundle savedInstanceState super.onCreate savedInstanceState setContentView R.layout.main this.getListView dbHelper new OverLimitDbAdapter this dbHelper.open fillData registerForContextMenu getListView @Override protected void onActivityResult int requestCode.. void fillData cursor dbHelper.fetchAllUserDrinks startManagingCursor cursor cursor.getCount String from new String OverLimitDbAdapter.KEY_USERNAME int to new int R.id.label Now create an array adapter and set it to display using our row SimpleCursorAdapter..