I have a RecyclerView holding TextViews in its rows. When you scroll all the way down, the scrolling stops so that the last item's bottom is aligned with the RecyclerView's bottom. Is there an easy way to make the last item able to scroll so that it's top is aligned with the RecyclerView's top?
This is a screenshot of default behavior when scrolling all the way down:
This is the desired behavior:
What I have tried:
I have calculated the heights of all the other views besides the RecyclerView and subtracted this value from the dynamic screen height and added this value to the bottom padding of the last item in the RecyclerView. But for some reason the dimensions are pushing the last item out of view.
The heights I measured are:
status bar height, the app bar height, the 3 header heights, the bottom footer bar height, the bottom navigation bar height (not seen in screenshot), and the height of the last item itself
I have looked at other similar questions/answers (e.g. scroll recyclerview item to top inside of scroll view, Allow Recyclerview Items to scroll past top of Recyclerview, Android what does the clipToPadding Attribute do?) but no success.
I need it to work in both portrait and landscape mode.