Code example for SimpleCursorAdapter

Methods: getCursor

0
	protected void onListItemClick(ListView l, View v, int position, long id) {
		super.onListItemClick(l, v, position, id);
		// Get the item that was clicked 
		SimpleCursorAdapter adapt;
		adapt = (SimpleCursorAdapter)getListAdapter();
		Toast.makeText(this, adapt.getCursor().toString(), Toast.LENGTH_LONG).show();		
	} 
     
    protected void fillData() { 
    	cursor = shoppinglistapp.getDBAdapter().fetchAllDataSets(tablename);
 		startManagingCursor(cursor);
 
 	    String[] from = new String[] { ShoppingListDatabase.FIELD_NAME_ID, ShoppingListDatabase.FIELD_NAME_NAME };
 		int[] to = new int[] { R.id.labelid, R.id.labelname };
 
 		// Now create an array adapter and set it to display using our row 
 		ListCursorAdapter datasets = new ListCursorAdapter(this, R.layout.list_row, cursor, from, to);
 		setListAdapter(datasets);
 	} 
     
    protected void showAddItemDialog() {