import android.app.ListActivity; import android.os.Bundle; import android.widget.SimpleCursorAdapter; import android.database.Cursor; public class ViewAll extends ListActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.showallrecords); DBHelper db = new DBHelper(this); db.open(); Cursor c = db.getAllQuotes(); startManagingCursor(c); // the desired columns to be bound String[] columns = new String[] { db.KEY_ID, db.KEY_QUOTE }; // the XML defined views which the data will be bound to int[] to = new int[] { R.id.id_entry, R.id.quote_entry }; // create the adapter using the cursor pointing to the //desired data as well as the layout information SimpleCursorAdapter mAdapter = new SimpleCursorAdapter(this, R.layout.list_format, c, columns, to); // set this adapter as your ListActivity's adapter this.setListAdapter(mAdapter); } }