int setHeaderTopBottomOffset(CoordinatorLayout parent, V header, int newOffset) { return this.setHeaderTopBottomOffset(parent, header, newOffset, -2147483648, 2147483647); }
int setHeaderTopBottomOffset(CoordinatorLayout parent, V header, int newOffset, int minOffset, int maxOffset) { int curOffset = this.getTopAndBottomOffset(); int consumed = 0; if (minOffset != 0 && curOffset >= minOffset && curOffset <= maxOffset) { newOffset = MathUtils.clamp(newOffset, minOffset, maxOffset); if (curOffset != newOffset) { this.setTopAndBottomOffset(newOffset); consumed = curOffset - newOffset; } }