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

Calling SectionTitleProvider.getSectionTitle with negative (-1) index #60

Open
dmitry-novikov opened this issue Jun 6, 2017 · 0 comments

Comments

@dmitry-novikov
Copy link

FastScroller is trying to get section title for item with negative index when RecyclerViews items are cleared while in active scroll with section bubble visible. That can lead to ArrayIndexOutOfBoundsException in application code.

java.lang.ArrayIndexOutOfBoundsException: length=0; index=-1
    at java.util.ArrayList.get(ArrayList.java:310)
    at my.Adapter.getSectionTitle(MyAdapter.java:123)
    at com.futuremind.recyclerviewfastscroll.FastScroller.setRecyclerViewPosition(FastScroller.java:250)
    at com.futuremind.recyclerviewfastscroll.FastScroller.access$500(FastScroller.java:21)
    at com.futuremind.recyclerviewfastscroll.FastScroller$2.onTouch(FastScroller.java:195)
    at android.view.View.dispatchTouchEvent(View.java:9371)
@dmitry-novikov dmitry-novikov changed the title Calling SectionTitleProvider.getSectionTitle with negative (-1) index Calling SectionTitleProvider.getSectionTitle with negative (-1) index Jun 6, 2017
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