Fixed
Status Update
Comments
an...@google.com <an...@google.com> #3
bulk comment, fyi: we have added icebox to all the tickets because it was suggested by blintz in order to prevent auto-close tickets. we want to keep our Compose tickets to remain opened.
see b/123001228#comment6
see
po...@google.com <po...@google.com> #4
(bulk comment) Hi,
Can you please check if this task can be finished before June, and if not remove `Jetpack Compose Major Release (May 2020)` hotlist?
(apologies if this is a double comment)
Thank you
Can you please check if this task can be finished before June, and if not remove `Jetpack Compose Major Release (May 2020)` hotlist?
(apologies if this is a double comment)
Thank you
ap...@google.com <ap...@google.com> #5
(bulk comment)
Please ignore last comment related to the June release. It was caused by a mistake in the query I used. Thank you.
Please ignore last comment related to the June release. It was caused by a mistake in the query I used. Thank you.
Description
I’ve got a view/composable structure like this:
And I want that innermost composable to be able to access ambients from the outer one.
The way to do this is first to call
compositionReference()
on the line commented[REF]
, and then use it to create the composition on the line above[DEREF]
.compositionReference()
is a public function, and works as expected. Compose APIs suchcompositionFor()
andsubcomposeInto()
accept aCompositionReference
parameter, but are lower-level than is convenient to use from regular view code (they require dealing withComponentNode
s). There's currently no way to pass theCompositionReference
into the child composition.The simplest way to support this would be for here .
ViewGroup.setContent
to take an optionalCompositionReference
parameter and plumb it through to the deepestcompositionFor
call. I've proven this works using reflection to access private APIsThis was initially discussed in this Slack thread .