安卓ListView上下留白正确做法

https://stackoverflow.com/questions/3953647/adding-empty-space-to-end-of-listview

The easiest way to add space is to add padding in xml and set clipToPadding:"false".

For RecyclerView

For ListView

And same goes for the ScrollView

This specifically adds the blank space to top and bottom but hide the space when you scroll the view.

Home Page