java - RecyclerView pull UP to refresh -
how can detect when recycler view @ bottom of list, , not bottom of screen, last item in recyclerview. right im using swiperefreshlayout cant set pull up.
use code inside onscrolled()
callback.
int lastvisibleitem = ((linearlayoutmanager) layoutmanager).findlastvisibleitemposition(); int totalitemcount = layoutmanager.getitemcount(); if (lastvisibleitem >= totalitemcount - 10) { loadmore(); }
Comments
Post a Comment