You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You should use global boolean parameter and then set dragFlags to 0 when drag&drop is off, otherwise set proper drag flags. @OverRide
public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
int dragFlags = DriversSingleton.getDriversSingleton().isEditMode()? ItemTouchHelper.UP | ItemTouchHelper.DOWN | ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT:0;
final int swipeFlags = 0;
return makeMovementFlags(dragFlags, swipeFlags);
}
Hello, I know how to disable drag and drop for specific type of ViewHolder at all, but how can I control it's "on/off" state from activity?
The text was updated successfully, but these errors were encountered: