Vinay Gaba03/05/2021, 3:30 AM
gave some of this functionality in classic Android. Just curious if something like this already exists or is planned for in Compose.
Adam Powell03/05/2021, 3:36 AM
Vinay Gaba03/05/2021, 3:38 AM
does and if that could somehow be leveraged?
Zach Klippenstein (he/him) [MOD]03/05/2021, 7:08 AM
type that is used by the android composition? That used to be possible, not sure if it’s been locked down in recent versions. If you can wrap the applier though, you could get nice granular and immediate notifications any time LayoutNodes are added/removed. That type is internal now, so you might need reflection to read their bounds, and i’m not sure if there’s a way to directly listen to them for remeasure/relayout events, but if there is that might work. Of course you’d need a custom entry point as well then, couldn’t just use
Adam Powell03/05/2021, 2:50 PM
Vinay Gaba03/05/2021, 4:44 PM
the preference for hoisted state objects as APIOn a related note, I’m curious about how state hoisting relates to not allowing manipulation of composable functions?
Adam Powell03/05/2021, 4:56 PM
Vinay Gaba03/05/2021, 5:09 PM
and inject this view directly at the top of the window/hierarchy. 2. The second idea is to somehow wrap every single Composable inside a
when a certain debug menu is enabled. Since every single composable is noew effectively a classic Android view as I wrap them inside ComposeView, I can just rely on
to get the callbacks I need.
Adam Powell03/05/2021, 5:15 PM
Vinay Gaba03/05/2021, 6:04 PM
Adam Powell03/05/2021, 7:01 PM
Zach Klippenstein (he/him) [MOD]03/05/2021, 8:19 PM
Vinay Gaba03/05/2021, 8:50 PM