Sunday, August 12, 2018

Android ListViews might cut off the last item

I'm working on an Android app and trying to smooth out the UI. One issue I've noticed is that ListViews sometimes get cut off at the bottom of the screen. In my project, this seems to only happen when they fill the entirety of a fragment that's presented as a tab in a tabbed activity. I hear that switching to a RecyclerView fixes this, but filling items in a RecyclerView is more complicated than in a plain ListView. Adding some padding to the bottom of the list (android:paddingBottom="30dp", with more padding if the items are thicker) works as a workaround, but I'm still looking for something more elegant that always works.

No comments:

Post a Comment