I have a SQLite database and I'm getting a ListView from the database through a SimpleCursorAdapter. This is the existing code:
Cursor c = mDatabase.query(
"database",
bla = new String[]{
"_id",
"title",
"message",
"time",
"date",
"done"
},
null, null, null, null, null);
startManagingCursor(c);
SimpleCursorAdapter listAdapter =
new SimpleCursorAdapter(this,
R.layout.list_item, c,
new String[]{"title", "message", "time", "date"},
new int[]{R.id.txtv_title, R.id.txtv_message, R.id.txtv_time, R.id.txtv_date}
);
setListAdapter(listAdapter);
This works as intended and I'm getting my ListView. Now I want that if the "done" field in my database contains the string "false" (instead of "true" ...), this row doesn't get into the ListView.
How can I do this? Thanks in advance!