Android-Image-Slider
Android-Image-Slider copied to clipboard
Auto Sliding.
i have to manually slide the first image in order to see the sliding effect. i want to see auto sliding without manually touching the slider view. i'm using the same code from read me.
<com.smarteist.autoimageslider.SliderView
android:id="@+id/imageSlider"
android:layout_width="match_parent"
android:layout_height="300dp"
app:sliderAnimationDuration="600"
app:sliderAutoCycleDirection="back_and_forth"
app:sliderAutoCycleEnabled="true"
app:sliderIndicatorAnimationDuration="600"
app:sliderIndicatorGravity="center_horizontal|bottom"
app:sliderIndicatorMargin="15dp"
app:sliderIndicatorOrientation="horizontal"
app:sliderIndicatorPadding="3dp"
app:sliderIndicatorRadius="2dp"
app:sliderIndicatorSelectedColor="#5A5A5A"
app:sliderIndicatorUnselectedColor="#FFF"
app:sliderScrollTimeInSec="1"
app:sliderStartAutoCycle="true" />
I am setting the following configuration dynamically however I am not observing a smooth manual scroll.
SliderView sliderView = binding.slideShow;
SlideShowSlider adapter = new SlideShowSlider(ctx);
sliderView.setSliderAdapter(adapter);
sliderView.setIndicatorAnimation(IndicatorAnimationType.WORM);
sliderView.setSliderTransformAnimation(SliderAnimations.SIMPLETRANSFORMATION);
sliderView.setIndicatorSelectedColor(Color.BLACK);
sliderView.setIndicatorUnselectedColor(Color.GRAY);
sliderView.setAutoCycle(false);