Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

when try to swipe viewpager fast ,i got IndexOutOfBoundsException

 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have viewpager with fragments.when i try to move viewpager it works fine.but if i swipe fast it gives me below exception.


 
Arun Kumarr
Ranch Hand
Posts: 661
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure we can help with just the stack trace. All we see is that there is array index out of bounds exception being thrown in your code somewhere.
Can you take a look at what defensive programming means here and here.

In short, are you really checking the size and length of whatever array you are reading before actually reading.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic