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

java.lang.IndexOutOfBoundsException #466

Open
lowfiend opened this issue Jun 14, 2017 · 2 comments
Open

java.lang.IndexOutOfBoundsException #466

lowfiend opened this issue Jun 14, 2017 · 2 comments
Labels

Comments

@lowfiend
Copy link

Hello

I got this error and found a page to explain this error.
But I don't know how to fix this error.
plz help me

`java.lang.IndexOutOfBoundsException
Inconsistency detected. Invalid item position 35(offset:35).state:36

android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4041)
android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:3999)
android.support.v7.widget.LayoutState.next(LayoutState.java:83)
android.support.v7.widget.StaggeredGridLayoutManager.fill(StaggeredGridLayoutManager.java:1412)
android.support.v7.widget.StaggeredGridLayoutManager.scrollBy(StaggeredGridLayoutManager.java:1878)
android.support.v7.widget.StaggeredGridLayoutManager.scrollVerticallyBy(StaggeredGridLayoutManager.java:1796)
android.support.v7.widget.RecyclerView.scrollByInternal(RecyclerView.java:1204)
android.support.v7.widget.RecyclerView.onTouchEvent(RecyclerView.java:1951)
android.view.View.dispatchTouchEvent(View.java:8497)`

http://blog.csdn.net/msn465780/article/details/53907772

@lowfiend
Copy link
Author

I found the bug in this issue.
I use StaggeredGridLayoutManager & setCustomLoadMoreView.
I disableLoadMore use three funtion :

  1. ultimateRecyclerView.disableLoadmore()
  2. ultimateViewAdapter.enableLoadMore(false)
  3. ultimateViewAdapter.internalExecuteLoadingView()

It would cause java.lang.IndexOutOfBoundsException error.

step:
Very slow scorlling, it will happen.

If you setLayoutManager is LinearLayoutManager, it works good not crash.
plz fix this bug, thank u.

@lowfiend
Copy link
Author

@cymcsg

@cymcsg cymcsg added the bug label Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants