protected void onScrollChanged(int i, int j, int k, int l) { super.onScrollChanged(i, j, k, l); if (mTrackedChild == null) { if (getChildCount() > 0) { mTrackedChild = getChildInTheMiddle(); mTrackedChildPrevTop = mTrackedChild.getTop(); mTrackedChildPrevPosition = getPositionForView(mTrackedChild); } return; } if (mTrackedChild.getParent() == this && getPositionForView(mTrackedChild) == mTrackedChildPrevPosition) { i = 1; } else { i = 0; } if (i != 0) { i = mTrackedChild.getTop(); if (mScrollDeltaListener != null) { j = mTrackedChildPrevTop; mScrollDeltaListener.onScroll(i - j); } mTrackedChildPrevTop = i; return; } else { mTrackedChild = null; return; } }
public void dispatchDraw(Canvas canvas) { super.dispatchDraw(canvas); if (mPinnedHeaderIsVisible && mPinnedHeaderView != null && !isMode(2) && mPinnedHeaderOffset > -mPinnedHeaderHeight) { canvas.save(); canvas.clipRect( 0, mPinnedHeaderOffset + mNavBottom, getWidth(), mPinnedHeaderHeight + mPinnedHeaderOffset + mNavBottom); canvas.translate(0.0F, mPinnedHeaderOffset + mNavBottom); mPinnedHeaderView.draw(canvas); canvas.restore(); } }
public void setAdapter(ListAdapter listadapter) { super.setAdapter(listadapter); if (listadapter instanceof PinnedHeaderAdapter) { setPinnedHeaderAdapter((PinnedHeaderAdapter) listadapter); } }
public void onMeasure(int i, int j) { super.onMeasure(i, j); measureHeader(mPinnedHeaderView); }
private void init() { super.setOnScrollListener(this); }