The last item is cropped because the RecyclerView is not displayed completely on the screen. This is accelerated by the advanced AppBar. Please note: when scrolling manually, the AppBar application will decrease as the last item is reached.
What was best in my case was to just collapse the AppBar before scrolling:
AppBarLayout appBarLayout = (AppBarLayout) getActivity().findViewById(R.id.appbar); appBarLayout.setExpanded(false, false); recyclerView.smoothScrollToPosition(position);
I think you could improve this solution by folding it only when necessary.
If folding an AppBar is undesirable, you can add a bottom pad with the same height as the extended AppBar. However, there will be other crashes (for example, when scrolling to a position that is already in the RecyclerView, but only off the screen).
source share