Does anyone know of a simple example that uses the CursorAdapter? Here's what I'm doing now and it's crashing with a RuntimeException. I'm sure it something simple I'm missing given that I'm a newbie and can't find any simple examples of a ListView that uses a Cursor.
Thanks,
...
public final class MyListActivity extends ListActivity { private class MyCursorAdapter extends CursorAdapter { public MyCursorAdapter(Context context, Cursor cursor) { super(context, cursor); // CRASH ...
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
myDB_ = new MyDB(this);
myDB_.open();
Cursor cursor = myDB_.read();
startManagingCursor(cursor);
MyCursorAdapter adapter = new MyCursorAdapter(this, cursor);
...