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

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -