Code example for ScrollView

Methods: getChildAt, getScrollY

0
            } 
        } 
        // 对于ScrollView 
        if (mScrollView != null) {
            // 子scroll view滑动到最顶端 
            View child = mScrollView.getChildAt(0);
            if (deltaY > 0 && mScrollView.getScrollY() == 0) {
                mPullState = PULL_DOWN_STATE;
                return true; 
            } else if (deltaY < 0
                    && child.getMeasuredHeight() <= getHeight()
                            + mScrollView.getScrollY()) {
                mPullState = PULL_UP_STATE;
                return true; 
            } 
        } 
        return false; 
    } 
 
    /** 
     * header 准备刷新,手指移动过程,还没有释放