mikepenz/FastAdapter

[Feature] Scroll to the last visible expanded item

Heroes84 opened this issue · 1 comments

Hi ! Thank you for awesome library ! When I use expandable item and it will be expand on the last visible item on recyclerview. The recyclerview not scrolling to the down and expanded item isn't fully visible. Is any trick or sample code to do scroll to the expanded item if it is a last visible item on the recyclerview ?

Details

  • 5.3.2
  • androidx 1.1.0
  • gradle tools 4.1.1
  • AS 4.1

@Heroes84 if you want to scroll to the bottom of the RV you can use something like:

recyclerView.scrollToPosition(lastPosition);

Scrolling is not handled by the adapter but by the RV itself.

You could for this requirement listen for the click event, and if the click occurs on the last item position you could use the above code to scroll down