private int reduceRemovableOffset(int newOffset){
  int currentRawOffset=getRawTopAndBottomOffset();
  if (currentRawOffset == 0) {
    return newOffset;
  }
  int currentAllOffset=getTopAndBottomOffset();
  if (!offsetValidation(currentAllOffset,currentRawOffset)) {
    return newOffset;
  }
  boolean sameSign=MathUtils.sameSign(newOffset,currentAllOffset);
  int reduce=Math.abs(currentAllOffset) - Math.abs(newOffset);
  if (sameSign && reduce >= 0) {
    int offset=Math.max(0,currentRawOffset - reduce);
    setRawTopAndBottomOffset(offset);
    return newOffset - offset;
  }
  if (!sameSign) {
    setRawTopAndBottomOffset(0);
    return newOffset;
  }
  return newOffset - currentRawOffset;
}

private int reduceRemovableOffset ( int newOffset ) { int currentRawOffset = getRawTopAndBottomOffset ( ) ; if ( currentRawOffset == 0 ) { return newOffset ; } int currentAllOffset = getTopAndBottomOffset ( ) ; if ( ! offsetValidation ( currentAllOffset , currentRawOffset ) ) { return newOffset ; } boolean sameSign = MathUtils . sameSign ( newOffset , currentAllOffset ) ; int reduce = Math . abs ( currentAllOffset ) - Math . abs ( newOffset ) ; if ( sameSign && reduce >= 0 ) { int offset = Math . max ( 0 , currentRawOffset - reduce ) ; setRawTopAndBottomOffset ( offset ) ; return newOffset - offset ; } if ( ! sameSign ) { setRawTopAndBottomOffset ( 0 ) ; return newOffset ; } return newOffset - currentRawOffset ; }
reduce removable raw offset of this view .
