Android examples for User Interface:RecyclerView
get last visible position of recycler view
import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; public class Main{ /**/*from w w w. ja va2s.c o m*/ * get last visible position of recycler view * * @param rv * @return */ public static int getLastVisiblePosition(RecyclerView rv) { if (rv != null) { final RecyclerView.LayoutManager layoutManager = rv .getLayoutManager(); if (layoutManager instanceof LinearLayoutManager) { return ((LinearLayoutManager) layoutManager) .findLastVisibleItemPosition(); } } return 0; } }