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

正在刷新的状态下,reclycleview居然可以上滑 #130

Open
guangzq opened this issue Sep 1, 2017 · 1 comment
Open

正在刷新的状态下,reclycleview居然可以上滑 #130

guangzq opened this issue Sep 1, 2017 · 1 comment

Comments

@guangzq
Copy link

guangzq commented Sep 1, 2017

正在刷新的状态下,reclycleview居然可以上滑

@liyujiang-gzu
Copy link

对,RecycleView正在刷新时上滑可能会闪退:java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 157(offset:157).state:588
解决方案,刷新时禁止滑动:
recyclerView.setOnTouchListener(new View.OnTouchListener() {
@OverRide
public boolean onTouch(View v, MotionEvent event) {
return swipeToLoadLayout.isRefreshing();
}
});

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

2 participants