java – IndexOutOfBoundsException while swiping ViewPager

My application crashed while I was scrolling between cards on the ViewPager and this was the error that I got: java.lang.IndexOutOfBoundsException: index=5 count=4″ I have absolutely no clue how to fix the index error but I think it is coming from the ArrayList that I have set up. Adapter class: public class DashboardFlavorAdapter extends PagerAdapter … Read more