As far as I can tell, the internal list mList, which holds references to the child views of carousel, is causing this issue.
Whenever the onAttachedToWindow function of Carousel.java gets called, new items will be added to the list mList. As a result, the internal data and the displayed data get out of sync, which results in the wrong data being displayed within the carousel.
In addition mList grows with every call of onAttachedToWindow and never gets cleared.
A simple solution could be to just clear the internal list when onDetachedFromWindow gets called.
As far as I can tell, the internal list mList, which holds references to the child views of carousel, is causing this issue.
Whenever the onAttachedToWindow function of Carousel.java gets called, new items will be added to the list mList. As a result, the internal data and the displayed data get out of sync, which results in the wrong data being displayed within the carousel.
In addition mList grows with every call of onAttachedToWindow and never gets cleared.
A simple solution could be to just clear the internal list when onDetachedFromWindow gets called.