Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make recycler view scroll more than the height of the items

I have a recycler view starting from top of screen going to the bottom of screen. At the bottom of screen there is one more view which hides the last item of recycler view.

I want recycler view to scroll a bit more, up to the top of the bottom element. So the last item could be visible.

I know, like i can add some dummy empty item at the end of list in recycler view. But i do not want to disturb the number of items in the recycler view. Should i resize the height of the last item of the recycler view so that its content comes above the bottom element?

Anyone has some better idea. whats the best way to do it?

like image 731
Pardeep Kumar Avatar asked Jan 26 '23 21:01

Pardeep Kumar


1 Answers

I got the answer. need to set this in recyclerview

android:clipToPadding="false"
android:paddingBottom="the bottom padding needed"
like image 67
Pardeep Kumar Avatar answered Jan 31 '23 18:01

Pardeep Kumar