Code example for RelativeLayout

Methods: getBottom, getTop

0
         * b. 若反弹回来,设置position为1的(即第二个)item可见 
         */ 
        if (mCurrentScrollState == SCROLL_STATE_TOUCH_SCROLL && mCurrentRefreshState != RefreshStatusEnum.REFRESHING) {
            if (firstVisibleItem == 0) {
                mRefreshViewImage.setVisibility(View.VISIBLE);
                if (mRefreshViewLayout.getBottom() >= mHeaderOriginalHeight + HEADER_HEIGHT_UPPER_LEVEL
                    || mRefreshViewLayout.getTop() >= 0) {
                    setStatusReleaseToRefresh(); 
                } else if (mRefreshViewLayout.getBottom() < mHeaderOriginalHeight + HEADER_HEIGHT_UPPER_LEVEL) {
                    setStatusDropDownToRefresh(); 
                } 
            } else { 
                setStatusClickToRefresh(); 
            } 
        } else if (mCurrentScrollState == SCROLL_STATE_FLING && firstVisibleItem == 0
                   && mCurrentRefreshState != RefreshStatusEnum.REFRESHING) {
            setSecondPositionVisible(); 
            mIsBounceHack = true;
        } else if (mCurrentScrollState == SCROLL_STATE_FLING && mIsBounceHack) {
            setSecondPositionVisible(); 
        }