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

setRefreshing(true)自动刷新的问题 #34

Open
g19980115 opened this issue Mar 14, 2018 · 0 comments
Open

setRefreshing(true)自动刷新的问题 #34

g19980115 opened this issue Mar 14, 2018 · 0 comments

Comments

@g19980115
Copy link

g19980115 commented Mar 14, 2018

在viewpager嵌套fragment中使用时,第一个fragment可以正常获取到mRefreshHeader的height,之后的获取到的都是0,导致不会显示STATE_REFRESHING这个状态。
应该修改下写法。
例:

public void setRefreshing(boolean refreshing) {
        if (refreshing && refreshEnabled && mLoadingListener != null) {
            mRefreshHeader.setState(ArrowRefreshHeader.STATE_REFRESHING);
            int height = mRefreshHeader.getMeasuredHeight();
            if (height == 0) height = dip2px(getContext(), 80);
            mRefreshHeader.onMove(height);
            mLoadingListener.onRefresh();
        }
    }
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