I have the following situation: in my app I have a...
# compose-android
m
I have the following situation: in my app I have a
TopAppBar
, multiple screens, as well as
ListDetailPaneScaffold
containing various screens. The
TopAppBar
has different functionality depending on the screen, thus to my understanding I should not use one single root-level
TopAppBar
but different ones for different screens, a shared element. Here's where I have troubles: I can add the
TopAppBar
to each screen, however, on the
adaptive
List-detail screen, each "screen" can only take up half of the screen, so if I add a
TopAppBar
to a "detail" level screen, it's going to be limited only that composable, which doesn't take up the whole screen and as such isn't a "top app bar" anymore. Is there any recommendations on how to handle the
TopAppBar
as a shared element in an adaptive ListDetail layout? Thanks.
a
This is the reason why I do prefer the single root-level
TopAppBar
approach, instead of having different ones for different screens with a shared element. But it is a lot trickier to handle and synchronize the state of the top app bar with the overall state of the navigation.
Linking back to the previous thread for visibility: https://kotlinlang.slack.com/archives/C04TPPEQKEJ/p1733422802027259
👍 1