Patrick Steiger
09/12/2023, 11:32 PMPatrick Steiger
09/12/2023, 11:36 PMPatrick Steiger
09/12/2023, 11:38 PMMutableState
owned by the topmost layout through callbacks ? I wanted to avoid it since it may lead the state with invalid data in case some composable forgets to call the callback. If the tagged layout leaves composition, this data should be clearedPablichjenkov
09/13/2023, 12:13 AMPatrick Steiger
09/13/2023, 12:29 AMPablichjenkov
09/13/2023, 12:44 AMascii
09/13/2023, 1:59 AMascii
09/13/2023, 2:01 AMPatrick Steiger
09/13/2023, 2:12 AMPatrick Steiger
09/13/2023, 2:15 AMBox(Modifier.nestedScroll(…)) {
Box {
Box(verticalScroll(…)) {
}
}
}
So, vertical scroll info from innermost box still reaches the outermost box even if middle layout has no nested scroll. It somehow connects.
I was hoping to do something similar to pass data to outermost composable from innermost composablePatrick Steiger
09/13/2023, 3:04 AMModifierLocalProvider
ascii
09/13/2023, 3:09 AMascii
09/13/2023, 3:10 AMColumn {
CollapsingAppBar
MainContent
BottomBar etc
}
You want CollapsingAppBar
to be collapsible only if MainContent
extends beyond the height of the screen, yes? Well, this doesn't answer your question but I'd recommend not going down this route. We've tried it back in the classic Android View days (if child is wrap_content
instead of match_parent
), and we had user reports telling us the collapse behaviour is bugged "sometimes" (they meant when content was small enough to fit in the screen).
Some people just expect things to work the same regardless of the situation, and in any case it's a neat thing for them to play around with. UI always reacts to their touch, you know?Zach Klippenstein (he/him) [MOD]
09/13/2023, 4:37 AMPatrick Steiger
09/13/2023, 5:14 AMPatrick Steiger
09/13/2023, 5:15 AMToolbar {
Column {
MainScrollableContent()
BottomBar()
}
}
in my case toolbar is a scaffold with a slot for “the rest of the content”, and not a slot in itselfdorche
09/13/2023, 5:56 PMPatrick Steiger
09/13/2023, 6:33 PMshouldn’t this be fixedwhat exactly? I’m not using Material toolbar or scaffold, it’s custom components.
dorche
09/13/2023, 8:26 PMPatrick Steiger
09/13/2023, 8:57 PMPatrick Steiger
09/13/2023, 8:58 PMPatrick Steiger
09/13/2023, 8:59 PMPatrick Steiger
09/13/2023, 8:59 PMWojciech Rozwadowski
12/08/2023, 12:45 PMPatrick Steiger
12/08/2023, 12:50 PM