daimajia / AndroidSwipeLayout

The Most Powerful Swipe Layout!
MIT License
12.38k stars 2.67k forks source link

How to only swipe out using click to close option. #534

Open welissonNeo opened 5 years ago

welissonNeo commented 5 years ago

I'm have a listview with a itemClickListener. When I swipe left to open and swipe out to close, the ListView item almost always accidentally click. I'm trying how to prevent that user accidentally click on the ListView firing itemClick. . Then How to disable automatically Swipe return to original position? Returning only If user click on It with options clickToClose? . After user click and swipped out, i need that Listview performs itemClick normally.

luckybilly commented 5 years ago

@welissonNeo Maybe you can try SmartSwipe like this:

SmartSwipe.wrap(view)
    .addConsumer(new SlidingConsumer())
    .setHorizontalDrawerView(textView)
    .setRelativeMoveFactor(1.0F)
    ;

it looks like: slidingConsume