daimajia / AndroidSwipeLayout

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

Listener for right and left view swipe #290

Open Hemant0601 opened 8 years ago

Hemant0601 commented 8 years ago

Can you please tell me how to get if the view is swiped to left or right. Thanks

abhishekagra commented 8 years ago

Hi @Hemant0601 , have you the find the solution for the problem? I am also facing same issue.

lou78 commented 8 years ago

if(swipe.getDragEdge()== SwipeLayout.DragEdge.Left) {}

Hemant0601 commented 8 years ago

@abhishekagra did u get any solution. tell me, if not , i will share my solution.

abhishekagra commented 8 years ago

@Hemant0601 Thanks for the reply. I have used 'leftOffset' value of onUpdate() method of 'SwipeLayout.SwipeListener' to get the direction of swipe. Do you have better solution? If yes, then please share it.

Hemant0601 commented 8 years ago

@abhishekagra I have used the same. But still its not very smooth. I am also looking for a smoother option.