private ItemTouchHelper createItemTouchHelper() {
        return new ItemTouchHelper(new ItemTouchHelper.SimpleCallback(ItemTouchHelper.UP | ItemTouchHelper.DOWN, 0) {

            private int currentDragItemStart = -1;

            @Override
            public boolean onMove(@NonNull final RecyclerView recyclerView, @NonNull final RecyclerView.ViewHolder viewHolder, @NonNull final RecyclerView.ViewHolder target) {
                //Note: do NOT use method "swapItems" here, because the "notifyItemChanged" calls sometimes stop the drag for some reason
                final int srcIdx = viewHolder.getBindingAdapterPosition();
                final int trgIdx = target.getBindingAdapterPosition();
                if (srcIdx != trgIdx) {
                    Collections.swap(itemList, srcIdx, trgIdx);
                    if (notifyOnEvents) {
                        notifyItemMoved(srcIdx, trgIdx);
                    }
                }

                return true;
            }

            @Override
            public void onSwiped(@NonNull final RecyclerView.ViewHolder viewHolder, final int direction) {
                //not supported currently
            }

            @Override
            public void onSelectedChanged(final RecyclerView.ViewHolder viewHolder, final int actionState) {
                super.onSelectedChanged(viewHolder, actionState);
                // We only want the active item
                if (actionState != ItemTouchHelper.ACTION_STATE_IDLE) {

                    //if DRAG starts, remember starting position
                    if (actionState == ItemTouchHelper.ACTION_STATE_DRAG) {
                        currentDragItemStart = viewHolder.getBindingAdapterPosition();
                    }

                    //mark view as "selected"
                    viewHolder.itemView.setBackgroundColor(CgeoApplication.getInstance().getResources().getColor(R.color.colorBackgroundSelected));
                }
            }

            @Override
            public void clearView(@NonNull final RecyclerView recyclerView, @NonNull final RecyclerView.ViewHolder viewHolder) {
                super.clearView(recyclerView, viewHolder);

                //remove background color
                viewHolder.itemView.setBackgroundColor(0);

                //if necessary, pass change event to views with position change
                if (currentDragItemStart >= 0) {
                    if (notifyOnPositionChange && currentDragItemStart != viewHolder.getBindingAdapterPosition()) {
                        notifyItemRangeChanged(Math.min(currentDragItemStart, viewHolder.getBindingAdapterPosition()), Math.abs(currentDragItemStart - viewHolder.getBindingAdapterPosition()) + 1);
                    }
                    currentDragItemStart = -1;

                }

            }

            public boolean isLongPressDragEnabled() {
                return false;
            }

            public boolean isItemViewSwipeEnabled() {
                return false;
            }
        });
    }
Whether this adapter should support drag&drop. If true, then use {@link #registerStartDrag(RecyclerView.ViewHolder, View)}
in your implementation of {@link #onCreateViewHolder(ViewGroup, int)} to register a GUI element for starting drag/drop
main/src/main/java/cgeo/geocaching/ui/recyclerview/ManagedListAdapter.java