Last active
July 25, 2023 00:32
-
-
Save strombringer/c4aa4b3ff6611ba2171cfcabbb2e4231 to your computer and use it in GitHub Desktop.
Adding bottom padding to RecyclerView or ListView so the last item is not obscured by a FAB (Android)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<android.support.v7.widget.RecyclerView | |
... | |
android:clipToPadding="false" | |
android:paddingBottom="72dp" | |
/> | |
<!-- | |
Button size = 56dp | |
Margin = 16dp // on tablets 24dp | |
-------------------------- | |
PaddingBottom = 72dp | |
based on https://stackoverflow.com/a/37012503/29694 | |
maybe add | |
android:scrollbarStyle="outsideOverlay" | |
https://stackoverflow.com/a/22032130/29694 | |
--> | |
<!-- | |
another option is: | |
RecyclerView.ItemDecoration https://stackoverflow.com/a/29720777/29694 | |
--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Many Thanks