package one.two;
import java.util.ArrayList;
import java.util.List;
import android.app.ListActivity;
import android.database.Cursor;
import android.inputmethodser
You are not populating the list with the data you retrieved. And, you should use SimpleCursorAdapter
in these cases:
private void getData() {
db.open();
List<String> items = new ArrayList<String>();
Cursor c = db.getAllEntry();
c.moveToFirst();
ListAdapter adapter=new SimpleCursorAdapter(this,
R.layout.view_list, c,
new String[] {"date", "title"},
new int[] {R.id.toptext, R.id.bottomtext});
setListAdapter(adapter);
setListAdapter(entries);
db.close();
}
In this case I'm guessing your table has a column named date
and another named title
. Take a look at this example for further reference: SimpleCursorAdapters and ListViews