AndroidImageSlider
AndroidImageSlider copied to clipboard
How to disable swipe gesture in sliders?
hi, I want the slider to auto-cycle, but we wouldn't touch it and disable swipe left and right in slider. can help me?
you can call this method(in kotlin): slider.setPagerTransformer(false, object : BaseTransformer() { override fun onTransform(view: View, v: Float) {} })
@hossein it does not work. Still I can slide with swipe gesture in slide.
@hossein it does not work. Still I can slide with swipe gesture in slide.
Hi @saikat1529, You should use this code for disable paging.
SliderLayout bsNews = findViewById(R.id.bsNews);
InfiniteViewPager mViewPager = bsNews.findViewById(R.id.daimajia_slider_viewpager);
mViewPager.setPagingEnabled(false); this code work for me and i cant swipe gesture in slide
hi tanks
On Sun, Sep 23, 2018 at 2:20 AM yaserNKM [email protected] wrote:
@hossein https://github.com/hossein it does not work. Still I can slide with swipe gesture in slide.
Hi @saikat1529 https://github.com/saikat1529, You should use this code for disable paging.
SliderLayout bsNews = findViewById(R.id.bsNews);
InfiniteViewPager mViewPager = bsNews.findViewById(R.id.daimajia_slider_viewpager);
mViewPager.setPagingEnabled(false); this code work for me and i cant swipe gesture in slide
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/daimajia/AndroidImageSlider/issues/372#issuecomment-423802862, or mute the thread https://github.com/notifications/unsubscribe-auth/Ad5K6QJCf43hkDR1EjQkKp0PajfVDlCIks5ud1JHgaJpZM4SJrjF .
@yaserNKM thanks a lot. I will give it a try.