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

PinnedHeaderExpandableListView中实现OnScrollListener接口的两个实现方法有bug望修复,详见代码注释 #11

Open
buptlinyuan opened this issue Apr 15, 2018 · 0 comments

Comments

@buptlinyuan
Copy link

@OverRide
public void onScrollStateChanged(AbsListView view, int scrollState) {
if (mHeaderView != null && scrollState == SCROLL_STATE_IDLE) {
int firstVisiblePos = getFirstVisiblePosition();
if (firstVisiblePos == 0) {
mHeaderView.layout(0, 0, mHeaderWidth, mHeaderHeight);
}
}
//此处会出现栈溢出,这样写有何用处?注释掉可以正常运行。是否为bug?
if (mScrollListener != null) {
mScrollListener.onScrollStateChanged(view, scrollState);
}
}

@Override  
public void onScroll(AbsListView view, int firstVisibleItem,  
        int visibleItemCount, int totalItemCount) {  
    if (totalItemCount > 0) {  
        refreshHeader();  
    }  
    //此处会出现栈溢出,这样写有何用处?注释掉可以正常运行。是否为bug?
    if (mScrollListener != null) {  
        mScrollListener.onScroll(view, firstVisibleItem, visibleItemCount, totalItemCount);  
    }  
}  
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

1 participant