android-advancedrecyclerview icon indicating copy to clipboard operation
android-advancedrecyclerview copied to clipboard

How to Disable and Enable Drag

Open linslouis opened this issue 6 years ago • 2 comments

mRecyclerViewDragDropManager.attachRecyclerView(mRecyclerView);

This is How I'm Attaching drag-drop to recycler view. How can I detach or stop drag?

linslouis avatar Mar 08 '18 06:03 linslouis

I believe you can set dragDropManager.setInitiateOnTouch(true); dragDropManager.setInitiateOnLongPress(true); dragDropManager.setInitiateOnMove(true); (or one of them, depends on your needs)

And just set them to false to disable drag-drop mode

dipcore avatar May 02 '18 19:05 dipcore

And if you want to bind/unbind events completely then use dragDropManager.attachRecyclerView(rv) and dragDropManager.release()

dipcore avatar May 02 '18 20:05 dipcore