Cursor while loop returning every value but the last

前端 未结 4 1575
旧巷少年郎
旧巷少年郎 2021-01-12 16:59

I am using a while loop to iterate through a cursor and then outputing the longitude and latitude values of every point within the database.

For some reason it is n

4条回答
  •  佛祖请我去吃肉
    2021-01-12 17:32

    Cursor c=null;
    c=......;
    try {
        if (c!=null) {
            for (c.moveToFirst(); !c.isAfterLast(); c.moveToNext()) {
    
            }
    
        }
    } finally {
        if (c!=null) {
            c.close();
        }
    }
    

提交回复
热议问题