zhanghai / AndroidFastScroll

Fast scroll for Android RecyclerView and more
https://play.google.com/store/apps/details?id=me.zhanghai.android.fastscroll.sample
Apache License 2.0
703 stars 64 forks source link

In Recyclerview with large data set, button will not go to bottom of list #12

Closed PeterParker135 closed 4 years ago

PeterParker135 commented 4 years ago

I can provide any info or samples you need.

This is pretty easy to reproduce:

Create a vertical recyclerview with a lot of items (1 page in my project has 3447 items), try fast scrolling to the bottom.

In current data set, thumb will not go lower than position 3433.

Recyclerview item height is set to ?listPreferredItemHeightSmall

Please let me know if need any other info

zhanghai commented 4 years ago

Did you try version 1.1.1? I fixed an issue about integer overflow.

PeterParker135 commented 4 years ago

This is on 1.1.1

zhanghai commented 4 years ago

I duplicated the locale list in sample app for 100 times, which gave me 72400 list items, and fast scrolling still worked well. Could you try to reproduce your issue with sample app and post your reproduction steps here?

Meanwhile, note that this library doesn' support variable item height out-of-the-box, and you need to implement your own ViewHelper to do that.

PeterParker135 commented 4 years ago

all of the list items are the same height. BUT...I'm very sorry, I should have mentioned that the list is in a viewpager2 with a tabLayout.

If I remove the tabs. It works as expected. How do I accommodate the tablayout?

PeterParker135 commented 4 years ago

After stripping out everything related to fast scroll but leaving the tablayout, I find it's still cutting off the last 2 items when I call scrollToPosition (I can still manually scroll to the last 2, though), so I don't think it's an issue with this lib. I believe you can close this issue :)