Matti MK
12/05/2024, 6:20 PMTopAppBar
in a full Compose app? I can see that Jetchat
has top app bars, but it has different top app bar instances for different screens.
I'm looking for samples / information on how to handle actions from the top app bar in a "normal" situation where there's only one top app bar defined on the root of the app, and it's contents change based on the current screen.
So, for example, let's assume there's a TopAppBar
on ScreenA
and that enables a multiple selection mode on that screen. The TopAppBar
has this action, but it's defined somewhere in my App.kt
file, whereas ScreenA
is in it's own module. How to go about propagating the actions from the TopAppBar
to the ScreenA
? Is it expected to pass a lambda all the way from the root of the app to the screen?Ian Lake
12/05/2024, 6:53 PMMatti MK
12/05/2024, 6:56 PMIan Lake
12/05/2024, 6:57 PMMatti MK
12/12/2024, 6:30 PMAlex Vanyo
12/13/2024, 11:48 PMAlex Vanyo
12/13/2024, 11:51 PMTopAppBar
lives outside of any particular pane. I think that’s a very reasonable design, and there’s a need to have some UI that knows about the overall navigation state, but doesn’t live within any particular destinationIan Lake
12/14/2024, 12:10 AMAlex Vanyo
12/14/2024, 12:34 AM