@Override public int clampViewPositionHorizontal(View child,int left,int dx){
  int leftBound=0;
  int rightBound=0;
switch (draggerView.getDragPosition()) {
case RIGHT:
    if (left > 0) {
      leftBound=draggerView.getPaddingLeft();
      rightBound=(int)draggerListener.dragHorizontalDragRange();
    }
  break;
case LEFT:
if (left < 0) {
  leftBound=(int)-draggerListener.dragHorizontalDragRange();
  rightBound=draggerView.getPaddingLeft();
}
break;
default :
break;
}
return Math.min(Math.max(left,leftBound),rightBound);
}

@ Override public int clampViewPositionHorizontal ( View child , int left , int dx ) { int leftBound = 0 ; int rightBound = 0 ; switch ( draggerView . getDragPosition ( ) ) { case RIGHT : if ( left > 0 ) { leftBound = draggerView . getPaddingLeft ( ) ; rightBound = ( int ) draggerListener . dragHorizontalDragRange ( ) ; } break ; case LEFT : if ( left < 0 ) { leftBound = ( int ) - draggerListener . dragHorizontalDragRange ( ) ; rightBound = draggerView . getPaddingLeft ( ) ; } break ; default : break ; } return Math . min ( Math . max ( left , leftBound ) , rightBound ) ; }
return the value of slide based on left and width of the element
