Using the Carousel as a RecyclerView item changes the visible item randomly when it is reattached to the window.
The selected item index is not affected, just the views.
The onAttachedToWindow method, which is called multiple times on a RecyclerView, adds all views to the array and makes it increase every time it is reattached, so I guess it needs to clear the view arrays before adding it.
I reproduced it using the latest release version: 2.1.4
Using the Carousel as a RecyclerView item changes the visible item randomly when it is reattached to the window. The selected item index is not affected, just the views.
carousel_bug.webm
The
onAttachedToWindow
method, which is called multiple times on a RecyclerView, adds all views to the array and makes it increase every time it is reattached, so I guess it needs to clear the view arrays before adding it.I reproduced it using the latest release version: 2.1.4
Sample project: https://drive.google.com/file/d/1nw1bKkbCc4nclZTCf9Dvf1tIoaZyGmGh/view?usp=sharing