Is there a simple way to scroll back to latest entries in a RecyclerView only when latest entries are no longer visible (due to the user scrolling away)?
Ideally, I wish if there is a listener that can be put on the RecyclerView's Adapter that is called only when an entry is in a given position (e.g., say an entry in position adapter.itemCount - 1 stops being visible).
I don't think there is a method that gets called only when the user-defined position goes out of view.
You can use the adapter's
onViewDetachedFromWindowmethod. You get the view holder as the function parameter and based onholder.getAbsoluteAdapterPosition(), you can probably show or hide the "Jump to latest button".