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
RecyclerView with different size rows #56
Comments
Have your adapter extend ICustomScrolling and invoke the useCustomScolling() method on your bar setup. |
Thanks! I forgot to set useCustomScrolling. Didn't see that method in the header tutorial. I've implemented this 2 interfaces now: FastScrollerUtil.IHeaderAdapter, ICustomScroller. And i am returning the height of my biggest ViewHolder in the getRowHeight method (IHeaderAdapter interface method). Is this the correct way to do this? |
This won't work correctly. The logic behind the HeaderAdapter is 1 header and 1 item, whereas every header has the same height and every item has the same height... |
Exactly. You'll need to remove that interface (keep ICustomScrolling) and fill in the methods yourself. |
Thanks guys, It works now. |
Just wanted to say thanks very much for this great library! The only library I could find where I could have different row heights with scrolling working as expected. |
@MinaHany @Marcelhozeman Hey, can you show some adapter code as far as implementing the IHeaderAdapter and ICustomScroller? We followed the Header tutorial to the tee but have issues with scrolling. It only seems to get one letter and doesn't work anywhere near expected. We're sure we did something wrong but have spent hours and are unable to figure it out. Appreciate it! |
If you could provide a sample of your code that would be the easiest. If not I can write up an example tomorrow. |
@joaquincorrales I am not implementing IHeaderAdapter, just ICustomScroller so not sure if my example will help but here it is anyway:
|
Hello,
I've got a RecyclerView with multiple ViewHolders that all have a separate layout file with a different height (for example 20dp, 40dp and 60dp). So each row has a different (but static) height. When i use the TouchScrollBar it doesn't scroll smoothly trough the items. Is there a way to support this?
The text was updated successfully, but these errors were encountered: