Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.ArithmeticException: divide by zero #45

Open
snailmail123 opened this issue Jul 18, 2023 · 0 comments
Open

java.lang.ArithmeticException: divide by zero #45

snailmail123 opened this issue Jul 18, 2023 · 0 comments

Comments

@snailmail123
Copy link

Always getting this error when have 1 item in recycler, remove that item, and call adapter.notifyDataSetChanged()

java.lang.ArithmeticException: divide by zero
        at com.jackandphantom.carouselrecyclerview.CarouselLayoutManager.onSelectedCallback(CarouselLayoutManager.kt:641)
        at com.jackandphantom.carouselrecyclerview.CarouselLayoutManager.access$onSelectedCallback(CarouselLayoutManager.kt:17)
        at com.jackandphantom.carouselrecyclerview.CarouselLayoutManager$startScroll$2.onAnimationEnd(CarouselLayoutManager.kt:473)
        at android.animation.Animator$AnimatorListener.onAnimationEnd(Animator.java:554)
        at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1253)
        at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1495)
        at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:146)
        at android.animation.AnimationHandler.access$100(AnimationHandler.java:37)
        at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:54)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:970)
        at android.view.Choreographer.doCallbacks(Choreographer.java:796)
        at android.view.Choreographer.doFrame(Choreographer.java:727)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7651)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant