recyclerviewhelper icon indicating copy to clipboard operation
recyclerviewhelper copied to clipboard

How to remove a particular feature while keeping others?

Open sarbajitsaha opened this issue 7 years ago • 1 comments

I want to remove the onItemDismiss feature completely, while keeping the others. That means, I don't want the views to be swipe-able at all. How do I achieve that?

sarbajitsaha avatar Jun 10 '17 12:06 sarbajitsaha

Following the docs just set the two last booleans to false .

 // Setup onItemTouchHandler to enable drag and drop , swipe left or right
ItemTouchHelper.Callback callback = new RVHItemTouchHelperCallback(adapter, true, true,true);
/**
 * Instantiates a new Rvh item touch helper callback.
 *
 * @param adapter                     the adapter
 * @param isLongPressDragEnabled      the is long press drag enabled
 * @param isItemViewSwipeEnabledLeft  the is item view swipe enabled left
 * @param isItemViewSwipeEnabledRight the is item view swipe enabled right
 */

haithamsboui avatar Nov 18 '17 05:11 haithamsboui