I have a table that I want to populate with the result of a database query. I use select all and the query returns four rows of data.
I use this code to populate text views inside table rows.
Cursor c = null; c = dh.getAlternative2(); startManagingCursor(c); // the desired columns to be bound String[] columns = new String[] {DataHelper.KEY_ALT}; // the XML defined views which the data will be bound to int[] to = new int[] { R.id.name_entry}; SimpleCursorAdapter mAdapter = new SimpleCursorAdapter(this, R.layout.list_example_entry, c, columns, to); this.setListAdapter(mAdapter);
I want to be able to separate four different KEY_ALT values ββand choose where they go. I want them to fill in four different text images instead of the one in my example above. How can I iterate over the resulting cursor?
Regards, AK
android sqlite cursor
kakka47 Feb 07 2018-11-11T00: 00Z
source share