timusus / RecyclerView-FastScroll

A simple FastScroller for Android's RecyclerView
Other
1.39k stars 183 forks source link

Scroll and section indicator jumps if cells have different heights #25

Closed cybergen78 closed 7 years ago

cybergen78 commented 8 years ago

The cells in my example have all equal heights except one (one label wraps and has two lines). Whenever I fast scroll over the one higher cell the scroll and the indicator flickers and jumps up and down.

timusus commented 8 years ago

One of the major limitations of of this library is that it assumes all adapter items are of equal height.

cybergen78 commented 8 years ago

Oh noes! It's a contact name and thus can't be ellipsized. Are you planning to fix this?

timusus commented 8 years ago

Oops, I never finished writing the comment above.

I don't have a fix in mind for this issue unfortunately. As a workaround, I would suggest hardcoding the number of lines for the text view so they're all the same.

cybergen78 commented 8 years ago

Little boxes on the hillside, Little boxes made of ticky tacky, Little boxes on the hillside, Little boxes all the same.

😅

jiansheliuxing commented 7 years ago

we can override ths method synchronizeScrollBarThumbOffsetToViewScroll and use item numbers to set the offset

timusus commented 7 years ago

Closed with #51