Closed floating-cat closed 9 years ago
I too need it, @floating-cat thanks for creating the issue
i need similar one. How can i disable swipe when last image ?
I haven't solve this problem... Please wait some days.
I need too.. Thanks!
Hi, Yes me too i need the disable the swipe on the first and last image. If we can have this feature everything will be perfect.
Hi! Is this issue resolved? Thank You!
@Klafe i think this library does not developing anymore
@Taifuru Noop, still in developing, but just too busy on works.
This issue is actively being discussed in https://github.com/daimajia/AndroidImageSlider/issues/82
try this, it will stop the swiping and auto Cycle in slider, it's work for me
if (imageCount < 2) { sliderShow.stopAutoCycle(); sliderShow.setPagerTransformer(false, new BaseTransformer() { @Override protected void onTransform(View view, float v) { } }); //TODO: disable indicator }
create a boolean variable and setter in SliderLayout.java
private boolean isDisableTouchEvent = true;
public void setDisableTouchEvent(boolean disableTouchEvent) {
isDisableTouchEvent = disableTouchEvent;
}
and replace onInterceptTouchEvent
function with below
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
if (isDisableTouchEvent)
return true;
else {
int action = ev.getAction();
switch (action) {
case MotionEvent.ACTION_DOWN:
pauseAutoCycle();
break;
}
return false;
}
}
after that you can disable swipe with this slider.setDisableTouchEvent(true);
How to disable swipe when only one image , or any workaround?
I know I can use
stopAutoCycle
to disable auto scrolling, but that's different.Thanks.