nitrico / MapViewPager

Android library that connects ViewPager fragments with Google Maps markers.
http://nitrico.github.io/mapviewpager
Apache License 2.0
241 stars 54 forks source link

Exception java.lang.IndexOutOfBoundsException: Index: 2, Size: 2 #6

Open alouanemed opened 7 years ago

alouanemed commented 7 years ago

Hi,

This bug occurred when having a list of >= 3 items, the app works fines when having 3 items ..any clues ?

Thanks


Exception java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
java.util.LinkedList.checkElementIndex (LinkedList.java:555)
java.util.LinkedList.get (LinkedList.java:476)
com.github.nitrico.mapviewpager.MapViewPager.moveToSingle (MapViewPager.java:242)
com.github.nitrico.mapviewpager.MapViewPager.moveTo (MapViewPager.java:231)
com.github.nitrico.mapviewpager.MapViewPager.access$000 (MapViewPager.java:48)
com.github.nitrico.mapviewpager.MapViewPager$1.onPageSelected (MapViewPager.java:178)
android.support.v4.view.ViewPager.dispatchOnPageSelected (ViewPager.java:1967)
android.support.v4.view.ViewPager.scrollToItem (ViewPager.java:685)
android.support.v4.view.ViewPager.setCurrentItemInternal (ViewPager.java:669)
android.support.v4.view.ViewPager.onTouchEvent (ViewPager.java:2284)
android.view.View.dispatchTouchEvent (View.java:10023)
android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:2 
Muratoter commented 6 years ago

Hi,When adding new location I am getting same error, too. Did you fix this problem?