You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happens when I increase the page count then I gradually decrease it to 0. I don't get this exception when i set page count to 1 and then back to 0. But if I set page count to more than that then i set it again to 0, i get this exception.
java.lang.ArithmeticException: divide by zero
at com.synnapps.carouselview.CarouselView$SwipeTask$1.run(CarouselView.java:409)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7116)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:925)
Turns out the library is doing this which is causing the exception.
int nextPage = (containerViewPager.getCurrentItem() + 1) % getPageCount();
The text was updated successfully, but these errors were encountered:
This happens when I increase the page count then I gradually decrease it to 0. I don't get this exception when i set page count to 1 and then back to 0. But if I set page count to more than that then i set it again to 0, i get this exception.
Turns out the library is doing this which is causing the exception.
int nextPage = (containerViewPager.getCurrentItem() + 1) % getPageCount();
The text was updated successfully, but these errors were encountered: