Closed rnitame closed 6 years ago
Seems like this (Line 402 in FastScrollRecyclerView) returns 0 in your RecyclerView which is not expected:
stateOut.rowHeight = child.getHeight() + getLayoutManager().getTopDecorationHeight(child) + getLayoutManager().getBottomDecorationHeight(child);
Because this height is the divider in Line 297 where your error occurs.
@G00fY2
I got it. Is there a workaround for using multiple ViewTypes?
I don't think so. Unfortunately this means that this implementation is also not working properly with sticky header libraries e.g.
I see.
Unfortunately this means that this implementation is also not working properly with sticky header libraries e.g.
Should I make this issue separately? (By the way, I use https://github.com/ShamylZakariya/StickyHeaders )
@G00fY2 How about this? https://github.com/timusus/RecyclerView-FastScroll/issues/69#issuecomment-355200068
Relates to #42. There is no "easy" way to support this. Also haven't seen a Google app which has this feature. They use another approach.
Also unfortunately @timusus seems to currently not maintain the library.:cry:
I'll happily consider your PR.
I would appreciate it if you could deploy the last changes in the meantime. Will may try to look into extending support for variable item sizes.
@rnitame
Is there a workaround for using multiple ViewTypes?
Yes, see the MeasurableAdapter
interface in the Readme.
@timusus I see. Thanks!
This divide by zero exception seems to occur if you have zero-height items in your adapter. I'm not sure when this would ever be the case..
If you do have zero-height items in your adapter, then you need to implement MeasurableAdapter
in your RecyclerViewAdapter
, and provide the heights of your views, so the FastScrollRecyclerView
can draw the itself accurately.
I can't reproduce this issue with the MeasurableAdapter
implemented.
FYI, I fixed this issue what I increment a version without more development 👍
This error happen when scrolling. Is there a any solution?