Home > Software design >  go to last item in recyclerview
go to last item in recyclerview

Time:10-12

show last item in recyclerview after click .smoothScrollToPosition(adapter.getItemCount() - 1)

does not work correctly

look at the photo

CodePudding user response:

After setAdapter() or inside onClick function write this code :

recyclerView.scrollToPosition(data.size() - 1);

recyclerView : is your RecyclerView object

data : your ArrayList

  • Related