0

I am using a pre-populated database in my application which has 70 rows of data. I am using a cursor with its methods, moveToFirst() , moveToLast() and moveToPosition(int) .

My question is, does the Cursor position use zero-based indexing? ie are my values (0 to 69) or (1 to 70). More specifically, if I wish to do the same as cursor.moveToFirst() should I use cursor.moveToPosition(0) or cursor.moveToPosition(1)

I have also tried referring to the android developers page, where it is given that the columns are zero-based indexed. But, no info is given regarding the rows.

Vamshidhar R
  • 98
  • 1
  • 8

1 Answers1

1

As documentation of moveToPosition() says: position - the zero-based position to move to. So, your rows numbered from 0 to 69.