public void flingHeader(float velocity) { if (mTouchDown) { mScroller.abortAnimation(); return; } mScroller.fling( 0, getHeaderTop(), 0, (int) velocity, 0, 0, mContainer.getHeaderTopMinimum(), mContainer.getHeaderTopMaximum()); ViewCompat.postInvalidateOnAnimation(this); }
private void offsetHeaderBy(int dy) { final int prevTop = mContainer.getTop(); final int clampedDy = MathUtils.clamp(prevTop + dy, getHeaderTopMinimum(), getHeaderTopMaximum()) - prevTop; mContainer.offsetTopAndBottom(clampedDy); }
private int getScrollRange() { return mContainer.getScrollRange(); }
public int getHeaderTopMinimum() { return mContainer.getHeaderTopMinimum(); }
public int getHeaderTop() { return mContainer.getTop(); }
public View getHeader() { return mContainer.getHeader(); }
public View getContent() { return mContainer.getContent(); }