https://kotlinlang.org logo
#compose
Title
# compose
z

zt

03/20/2022, 10:55 PM
I'm using this library https://github.com/raamcosta/compose-destinations, is it possible to get a screen that can be collapsed down but displayed on top of another screen? Like the collapsible player in the Youtube app
i

ildar.i [Android]

03/21/2022, 3:54 AM
You mean like bottomSheets? You can define style for your destination (in annotation)
i

Ian Lake

03/21/2022, 1:37 PM
If you need something to persist even while you change to a different screen, then that content should never have been a part of your NavHost at all, but its own separate composable at a level outside the NavHost
r

Rafael Costa

03/28/2022, 5:06 PM
Yeah exactly what both @ildar.i [Android] and @Ian Lake said. If you want simple bottom sheet destination, it will be simple to do with Compose Destinations (I’m the developer behind it btw 👋 ). You can check how to [here](https://composedestinations.rafaelcosta.xyz/styles-and-animations#bottomsheet-style) and read [this also](https://composedestinations.rafaelcosta.xyz/styles-and-animations#animations--bottom-sheet-setup). If you need something to show above a “screen container” (aka the NavHost), then you need to put some more thought into it, but it will have to be outside the NavHost.
👋 1
(worth noting that you’ll have to use a different dependency as explained above that uses Accompanist navigation)