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

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -