public static void bindDragHandle ( final RecyclerView . ViewHolder holder , final IExtendedDraggable item ) { // if necessary, init the drag handle, which will start the drag when touched if ( item . getTouchHelper ( ) != null && item . getDragView ( holder ) != null ) { item . getDragView ( holder ) . setOnTouchListener ( new View . OnTouchListener ( ) { @ Override public boolean onTouch ( View v , MotionEvent event ) { if ( MotionEventCompat . getActionMasked ( event ) == MotionEvent . ACTION_DOWN ) { if ( item . isDraggable ( ) ) item . getTouchHelper ( ) . startDrag ( holder ) ; } return false ; } } ) ; } }
this functions binds the view s touch listener to start the drag via the touch helper ...