Zach Klippenstein (he/him) [MOD]
01/28/2021, 4:59 PMAbstractComposeView
, when creating its composition, looks up the view tree for a CompositionReference
using findViewTreeCompositionReference()
. This seems really neat, since it could enable ComposeView -> AndroidView -> … -> ComposeView
hierarchies to automatically link their compositions. However, as far as I can tell, AndroidView
never actually sets the view tree CompositionReference
from the calling composition on its View
, and this whole mechanism seems to currently only be used to find the WindowRecomposer
.
Would it be feasible for every AndroidView
call to get a CompositionReference
and set it on its View
to support this? Is this sort of automatic linking of compositions across android view subtrees even something that would make sense? If yes, is the AndroidView
wiring planned?
https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ComposeView.kt;drc=a32c0003449e3ca6141ef497f0ee2759b41943ba;l=176Zach Klippenstein (he/him) [MOD]
01/28/2021, 5:00 PMCompositionReference
was composed, and so if that’s still the case then this simple view tree mechanism lacks the ability to push those recompose events down and this wouldn’t work.Zach Klippenstein (he/him) [MOD]
01/28/2021, 5:03 PMAdam Powell
01/28/2021, 5:33 PMLeland Richardson [G]
01/28/2021, 5:42 PMZach Klippenstein (he/him) [MOD]
01/28/2021, 7:01 PMAdam Powell
01/28/2021, 7:31 PMAdam Powell
01/28/2021, 8:06 PMVinay Gaba
01/28/2021, 9:27 PMZach Klippenstein (he/him) [MOD]
01/28/2021, 9:29 PMzsperske
02/01/2021, 1:01 AM