ernestoyaquello / DragDropSwipeRecyclerview

Kotlin Android library that extends RecyclerView to support gestures like drag & drop and swipe, among others. It works with vertical, horizontal and grid lists.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to keep one item is not able to drag & drop?

congdanh1608 opened this issue · comments

I implement this library to show the grid item with drag & drop feature. I want to disable that feature for the latest item.
Do you know any way to handle it?

Thank you.

This is in the documentation, please take a look at the method canBeDragged(...) of the adapter. You can override it and implement it as you wish.

I hope that helps.

Hi @ernestoyaquello
Thanks for your help. I already tried.
I find the canBeDroppedOver and canBeDroppedOver methods. These methods was solved my issue.

Thank you.