I have a listview that gets it's posts from a database. I want the ten
latest entries sorted by the time they where added to the database.
This works, but it always skips the first post until a newer one is
added. What could I be doing wrong?
For this I use the following code:
public Cursor
This for loop looks really strange:
for(cursor.moveToFirst(); cursor.moveToNext(); cursor.isAfterLast())
The condition for isAfterLast should be inverted.
Also don't iterate twice and call getColumnIndex for each row, nether of those
is necessary. Something like this should work:
cursor =
2 matches
Mail list logo