AndroidImageSlider icon indicating copy to clipboard operation
AndroidImageSlider copied to clipboard

How to disable swipe gesture in sliders?

Open yaserNKM opened this issue 7 years ago • 5 comments

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?

yaserNKM avatar Feb 18 '18 12:02 yaserNKM

you can call this method(in kotlin): slider.setPagerTransformer(false, object : BaseTransformer() { override fun onTransform(view: View, v: Float) {} })

hossein-rezaeian avatar Aug 23 '18 05:08 hossein-rezaeian

@hossein it does not work. Still I can slide with swipe gesture in slide.

saikat1529 avatar Sep 23 '18 07:09 saikat1529

@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

yaserNKM avatar Sep 23 '18 09:09 yaserNKM

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 .

sajjadte avatar Sep 23 '18 20:09 sajjadte

@yaserNKM thanks a lot. I will give it a try.

saikat1529 avatar Sep 26 '18 09:09 saikat1529