danoz73 / RecyclerViewFastScroller

A Fast Scroller for the RecyclerView world!
Other
1.13k stars 211 forks source link

Added refreshing bar height in onLayout #71

Open marcin-adamczewski opened 7 years ago

marcin-adamczewski commented 7 years ago

Hi ! There was an issue in our project that sometimes we weren't able to move bar handle to the bottom of the bar. I discovered it was caused by "onCreateScrollProgressCalculator" method which is called only once in onLayout method, but bar height was changing in subsequent onLayout calls. That caused VerticalScrollProgressCalculator and VerticalScreenPositionCalculator to use wrong bar height.

I broke your immutable VerticalScrollBoundsProvider class so it have update method now. IMHO it is better solution for view efficiency than creating new objects in on layout.