android中如何去按断recyclerview是否滑动到底部

2025-01-02 23:51:48
推荐回答(1个)
回答(1):

用LayoutManager判断

RecyclerView rc=(RecyclerView)view;
LinearLayoutManager lm= (LinearLayoutManager) rc.getLayoutManager();
if(lm.findViewByPosition(lm.findFirstVisibleItemPosition()).getTop()==0 && lm.findFirstVisibleItemPosition()==0)
return true;