setUsingSpansToEstimateScrollbarDimensions
open fun setUsingSpansToEstimateScrollbarDimensions(useSpansToEstimateScrollBarDimensions: Boolean)(source)
When this flag is set, the scroll offset and scroll range calculations will take account of span information.
This is will increase the accuracy of the scroll bar's size and offset but will require more calls to getSpanGroupIndex".
This additional accuracy may or may not be needed, depending on the characteristics of your layout. You will likely benefit from this accuracy when:
- The variation in item span sizes is large.
- The size of your data set is small (if your data set is large, the scrollbar will likely be very small anyway, and thus the increased accuracy has less impact).
- Calls to getSpanGroupIndex are fast.
If you decide to enable this feature, you should be sure that calls to getSpanGroupIndex are fast, that set span group index caching is set to true via a call to and span index caching is also enabled via a call to { }.