Remove the cursor.moveToFirst().

The moveToNext() will move the pointer to the first row the first time 
through the while statement.

If you need to reset the cursor before the while loop, try using 
cursor.moveToPosition( -1 ).

Steven
Studio LFP
http://www.studio-lfp.com


On Friday, October 28, 2011 10:12:01 AM UTC-5, André wrote:
>
> cursor.moveToFirst(); 
> while (cursor.moveToNext()) { 
> ...} 
>
> When I use this code the first row in my cursor seems to be skipped. 
> It feels wrong to make the cursor jump back one step in while every 
> time. 
> How would I get the first row ? 
>
> //André

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to