Android-Image-Slider
Android-Image-Slider copied to clipboard
After first loop, slide from right to left
Hello im trying this for the first time. I have 3 images to slides automatically. But after the first loop, when the first image slides to 2nd image, it slide from right to left. But when 3rd image slide to 1st image, it slide normally from left to right.
This happened after 1st loop which is in the first loop everything running normally, every image slide from left to right.
My expectation is, All of them should be slide from left to right.
The indicator slide perfectly normal for all the images.
Here is my code:
val data = ArrayList<ImageSlideModel>()
smartSlider = findViewById(R.id.slider)
data.add(ImageSlideModel(R.drawable.anime_wallpaper, "Yo Mum"))
data.add(ImageSlideModel(R.drawable.anime_wallpaper2, "My Dada"))
data.add(ImageSlideModel(R.drawable.anime_wallpaper3, "NOOOOOOOOO"))
adapter = AutoSliderImageAdapter(data)
smartSlider.autoCycleDirection = SliderView.LAYOUT_DIRECTION_LTR
smartSlider.setSliderAdapter(adapter)
smartSlider.setSliderTransformAnimation(SliderAnimations.SIMPLETRANSFORMATION)
smartSlider.setIndicatorAnimation(IndicatorAnimationType.SLIDE)
smartSlider.scrollTimeInSec = 2
smartSlider.isAutoCycle = true
smartSlider.startAutoCycle()