0

In my xml layout, I have:

  • a recycler view (height variable)

  • a bottom button (56dp = H1)

Behavior expected:

  • if recycler view height < (screen size - H1) -> button is fully showed at the bottom of the screen.

  • if recycler view height > (screen size - H1) -> button is below and scrollable with recycler view.

I can do it programmatically.

Can we do it just using layout file?

effect demo

Thanks.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Anh-Tuan Mai
  • 1,129
  • 19
  • 36
  • Is it like adding a footerView (your button) to RecyclerView when `recycler view height > (screen size - H1) `? – Ali Sep 17 '19 at 15:05
  • sorry, i dont understand your question? I want to scroll the bottom button when the recycler view touch it (when items change). – Anh-Tuan Mai Sep 17 '19 at 15:20
  • 1
    take a look at BottomNavigation – Zafer Celaloglu Sep 17 '19 at 15:31
  • 1
    what about layout behavior for bottomNavigationView? https://stackoverflow.com/questions/44777869/hide-show-bottomnavigationview-on-scroll – Lukas Sep 17 '19 at 20:43

0 Answers0