-
Notifications
You must be signed in to change notification settings - Fork 763
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
Invalid target position when scrolling #44
Comments
The currentPosition was -1 before the crash in DiscreteScrollLayoutManager startSmoothPendingScroll method |
Thanks for the report, unfortunately I won't be able to look into it until weekends. |
Hey no problem at all. I traced down the issue and found out it is caused by how the DiscreteScrollView is placed in the layout. I have created a sample project that can reproduce the crash. I hope it saves you some time. https://drive.google.com/open?id=0B4VSgmZteixRX002ZDVYR1c0RnM Thanks again for all the effort! |
Yeah, the issue exists, I've checked the project. Can't yet say why it happens. |
It happened even before 1.3 |
I found the root cause might come from
|
@youfacepalm thanks a lot for the project you created, it saved me a lot of time. The issue is resolved. |
Ensure that currentPosition is valid when onLayoutChildren is called and there items in the adapter. closes yarolegovich#44
Hi, Thanks for the great library. I encountered an app crash with the following stacktrace when using the latest (1.3.0) version. I simply fetch a list from an api and update the RV adapter with notifyDatasetChanged() after setting the new list. It works fine if there are more than 2 items in the list. But it crashes if there are 2 or fewer items in the list. The crash occurs soon after I scroll the first item.
The text was updated successfully, but these errors were encountered: