Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Divider appears before the first item #31

Open
metow opened this issue Jul 27, 2013 · 3 comments
Open

Divider appears before the first item #31

metow opened this issue Jul 27, 2013 · 3 comments

Comments

@metow
Copy link

metow commented Jul 27, 2013

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?

@exside
Copy link

exside commented Nov 6, 2013

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

@mkonecny
Copy link

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

@meijion
Copy link

meijion commented Jul 28, 2014

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);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants