ImaginativeShohag / Why-Not-Image-Carousel

Why Not use Image Carousel if you have lots of images to show!
https://imaginativeshohag.github.io/Why-Not-Image-Carousel/
Apache License 2.0
472 stars 69 forks source link

Autoplay: Autoplay stop work after recycle in recycleView. #95

Closed hernanistn closed 1 year ago

hernanistn commented 1 year ago

After scroll recycle view autoplay stop to work.

style:

    <item name="autoPlay">true</item>
    <item name="autoPlayDelay">1500</item>
    <item name="carouselType">SHOWCASE</item>
    <item name="scaleOnScroll">true</item>
    <item name="infiniteCarousel">true</item>
    <item name="showBottomShadow">false</item>
    <item name="showCaption">false</item>
    <item name="showIndicator">false</item>
    <item name="showNavigationButtons">false</item>
    <item name="showTopShadow">false</item>
    <item name="touchToPause">true</item>
    <item name="carouselGravity">CENTER</item>
    <item name="scalingFactor">0.25</item>

OnBind

           carousel.registerLifecycle(lifecycle)
           carousel.setData(establishment.listImages) //listImages as CarouselItem

Video example https://user-images.githubusercontent.com/62159705/212760201-e043c51c-837b-4bd1-afe3-ae27c7d8bde6.mp4

Console error E/ImageCarousel: The first view is not found! Maybe the app is in the background.