Recyclerview scroll past fab

I use recyclerview and have FAB on my layout. I want you to have a little space at the bottom of the last element, as the Gmail application does, when you scroll the bottom of the right mouse button on the bottom element, you can still click.

I tried adding some padding to the bottom that achieves this, but the scrollbar does not scroll all the way to the end, stopping at the fill height, while the Gmail version. Does anyone know how to do this?

<RecyclerView
    android:id="@+id/list"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clipToPadding="false"
    android:paddingBottom="90dp"
    android:scrollbars="vertical" />
+4
source share
3 answers

" " . , , android.widget.Space.

recycler view , Google .

recycler, header/footer/section:

Maven, : https://github.com/eyeem/RecyclerViewTools

:

WrapAdapter wrapAdapter = new WrapAdapter(adapter);
wrapAdapter.addFooter(inflater.inflate(R.layout.footer, recycler,   false));
recycler.setAdapter(wrapAdapter);
+5

- usesFooter() 1 , ( , - ). onCreateViewHolder() , , (, 80dp)

, onBindViewHolder(), .

+1

use it

  android:layout_marginBottom = "80dp"
-1
source

All Articles