@ Override public int clampViewPositionHorizontal ( View child , int left , int dx ) { int newLeft = draggedView . getLeft ( ) ; if ( ( draggableView . isMinimized ( ) && Math . abs ( dx ) > MINIMUM_DX_FOR_HORIZONTAL_DRAG ) || ( draggableView . isDragViewAtBottom ( ) && ! draggableView . isDragViewAtRight ( ) ) ) { newLeft = left ; } return newLeft ; }
Override method used to configure the horizontal drag . Restrict the motion of the dragged child view along the horizontal axis .