6

In my application I have branding footer at the end of scroll on all screens (for screens which have scroll) and static at bottom of the screen when(no scroll).

But I am facing issues to achieve this with screen which has list. I am using recyclerview for showing list. I want to show Branding Footer at end of the recyclerview when it has scroll and it will be visible when it is scrolled at the bottom. This is achievable with Recyclerview with footer.

footer at recyclerview end

But when recyclerview does not have scroll (when few items in list), I want footer fixed at bottom of the screen.

footer when less items static at bottom

Thanks in advance!

Virat18
  • 3,427
  • 2
  • 23
  • 29

1 Answers1

0

The question appears similar to several other, most of the stack overflow posts related to this question point towards the usage of itemdecoration to achieve this (By adding itemdecoration of the desired height)

One way of achieving this would be to determine the height of the recycler view beforehand and then using that information to set the offset for the footer in the itemdecoration associated with the recycle view

This might help: How implement sticky footer in recyclerview

Nish
  • 51
  • 1
  • 7