Does anyone know how to get a BottomAppBar to hide...
# compose
d
Does anyone know how to get a BottomAppBar to hide upon scroll of a LazyColumn?
l
Just use LazyListState for your LazyColumn and with isScrollInProgress you know if the list is being scrolled
b
But which direction is it being scrolled?
Do I have to calculate that myself?
l
isScrollInProgress
is just a boolean to know if you are scrolling the list. I you need to know the direction, it might be done with InteractionSource (never used this API but it could be worth checking)
you can also check for firstVisibleItemScrollOffset
t
You could also use nestedScroll modifier. Than you could calculate the direction. But of course a little bit more complicated. I think this sample code does exactly what you want: https://developer.android.com/reference/kotlin/androidx/compose/ui/input/nestedscroll/package-summary#(androidx.compose.ui.[…]estedScrollDispatcher)
d
Oooh
This looks promising!
Thanks folks!
a
@dewildte 👋 were you able to get it to work?
d
@allan.conda I have not had time to focus on implementing that feature yet, sorry.
a
I see, no worries! 🙏