Open alexwyattdev opened 1 year ago
java.lang.ArithmeticException: divide by zero at com.jackandphantom.carouselrecyclerview.CarouselLayoutManager.onSelectedCallback(CarouselLayoutManager.kt:559)
selectedPosition = abs(selectedPosition % itemCount)
Example for reproducing the issue:
Tried invalidation, canceling animations, removing all views - to no avail.
Workaround solution I found is to manually inflate the CarouselRecyclerView into the layout when data is ready, then before refreshing, remove it.
java.lang.ArithmeticException: divide by zero at com.jackandphantom.carouselrecyclerview.CarouselLayoutManager.onSelectedCallback(CarouselLayoutManager.kt:559)
selectedPosition = abs(selectedPosition % itemCount)
Example for reproducing the issue:
Tried invalidation, canceling animations, removing all views - to no avail.