[android-developers] Re: [Force Close]CursorIndexOutOfBoundsException: Index 4 requested, with a size of 4

2011-08-24 Thread lbendlin
indexes start at 0. If you have four data points they are at index 0, 1, 2 and 3. -- 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

Re: [android-developers] Re: [Force Close]CursorIndexOutOfBoundsException: Index 4 requested, with a size of 4

2011-08-24 Thread Alaeddine Ghribi
So how can i solve it? I maked cur.moveToPosition(index-1); and i have always the same problem. Any other solution please? 2011/8/24 lbendlin l...@bendlin.us indexes start at 0. If you have four data points they are at index 0, 1, 2 and 3. -- You received this message because you are

Re: [android-developers] Re: [Force Close]CursorIndexOutOfBoundsException: Index 4 requested, with a size of 4

2011-08-24 Thread lbendlin
first of all you need to use the same approach for your map annotations. When you define their index, start at 0 as well and make sure they are consecutive. Secondly, rather than using a cursor you should do a raw SQL query using your annotation index as the filter. -- You received this

Re: [android-developers] Re: [Force Close]CursorIndexOutOfBoundsException: Index 4 requested, with a size of 4

2011-08-24 Thread Alaeddine Ghribi
You mean that i add a List of String in the class that extends ItemizedOverlay(like the list of geopoints)? Then make a raw query and pass the index as parameter on the ontap(index) function? public class ItemizedOverlayPerso extends ItemizedOverlayOverlayItem { private ListGeoPoint points