android - Recyclerview scrolling past FAB -


i'm using recyclerview , have fab on layout. want able give bit of space @ bottom of last item gmail app when scroll bottom right hand star on bottom item still clickable.

i tried adding padding bottom achieves scrollbar doesn't scroll way bottom, stopping @ padding height, whilst gmail version does. have idea how 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" /> 

you have add "footer" @ end of adapter. footer blank view, android.widget.space.

recycler view doesn't have native options header n footers, can google around , find few options.

i developed library extras recycler view have header/footer/section options:

i didn't upload yet maven can grab code here: https://github.com/eyeem/recyclerviewtools

then use just:

wrapadapter wrapadapter = new wrapadapter(adapter); wrapadapter.addfooter(inflater.inflate(r.layout.footer, recycler,   false)); recycler.setadapter(wrapadapter); 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -