I have a table layout that I want to populate with the result from a database query. I use a select all and the query returns four rows of data.
I use this code to
Cursor objects returned by database queries are positioned before the first entry, therefore iteration can be simplified to:
Cursor
while (cursor.moveToNext()) { // Extract data. }
Reference from SQLiteDatabase.