PullToRefresh-ListView icon indicating copy to clipboard operation
PullToRefresh-ListView copied to clipboard

Divider appears before the first item

Open metow opened this issue 12 years ago • 3 comments

Divider appears before the first item, how do i get rid of that? I have a 10dp of divider height between items, but I don't want it to appear before the first item. android listview doesn't do that, but using this library does. How de we solve it?

metow avatar Jul 27 '13 08:07 metow

Same issue here =)...any hints about where to start? Tried around in the styles, but no success...

exside avatar Nov 06 '13 13:11 exside

Same problem. Also see this problem in https://github.com/chrisbanes/Android-PullToRefresh :(

mkonecny avatar Nov 19 '13 03:11 mkonecny

public boolean onTouchEvent(MotionEvent event) {
    final int y = (int) event.getY();
    mBounceHack = false;

    switch (event.getAction()) {
    case MotionEvent.ACTION_UP:
        if (!isVerticalScrollBarEnabled()) {
            setVerticalScrollBarEnabled(true);
        }
        if (getFirstVisiblePosition() == 0 && mRefreshState != REFRESHING) {
            if ((mRefreshView.getBottom() >= mRefreshViewHeight || mRefreshView
                    .getTop() >= 0) && mRefreshState == RELEASE_TO_REFRESH) {
                // Initiate the refresh
                mRefreshState = REFRESHING;
                prepareForRefresh();
                onRefresh();
            } else if (mRefreshView.getBottom() < mRefreshViewHeight
                    || mRefreshView.getTop() <= 0) {
                // Abort refresh and scroll down below the refresh view
                resetHeader();

// setSelection(1); // try delete this row } } break; case MotionEvent.ACTION_DOWN: mLastMotionY = y; break; case MotionEvent.ACTION_MOVE: applyHeaderPadding(event); break; } return super.onTouchEvent(event); }

meijion avatar Jul 28 '14 04:07 meijion