AndroidSwipeLayout icon indicating copy to clipboard operation
AndroidSwipeLayout copied to clipboard

Left and Right swiping

Open TeodorKolev opened this issue 7 years ago • 2 comments

Is there any option for left and right swiping at same time like this example? If there is how can I achieve that?

TeodorKolev avatar Mar 29 '17 14:03 TeodorKolev

My way of doing it is by adding one more layout before the top one. And add one more swipeLayout.addDrag in the adapter. Then I use something like the following which is the current view so that I could define corresponding actions.

if (swipeLayout.getCurrentBottomView().getId() == R.id.bottom_wrapper_left) {
    // Current view with id R.id.bottom_wrapper_left
} else {
   // Current view with id R.id.bottom_wrapper_right
}

This link might be helpful too. http://android-pratap.blogspot.in/2015/07/swipe-recyclerview-using.html

yanrubi avatar Mar 30 '17 03:03 yanrubi

Hi, I already implemented this with the same approach, but the problem is whenever I swipe left, and then right I have to touch the card again. What if I hold the cell once, and able to move freely in both directions. It would be great if you help me out with this approach

rajat028 avatar Jun 21 '18 21:06 rajat028