0

I have a RecyclerView and I want to smooth scroll to position. When I use smoothScrollTo - it scrolls to that position - but it is not first visible. Can someone help with that?

Uriel Frankel
  • 13,300
  • 7
  • 43
  • 65

1 Answers1

0

Ok. this is how to do it:

  1. Get the current scroll. here is how to do it.
  2. Calculate the offset of the item
  3. Use: smoothScrollToXY(0,offset - currentScroll);
Community
  • 1
  • 1
Uriel Frankel
  • 13,300
  • 7
  • 43
  • 65