PinnedHeaderExpandableListView icon indicating copy to clipboard operation
PinnedHeaderExpandableListView copied to clipboard

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

Open buptlinyuan opened this issue 6 years ago • 0 comments

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

buptlinyuan avatar Apr 15 '18 16:04 buptlinyuan