https://kotlinlang.org logo
a

andrew

10/23/2019, 10:36 PM
With jetpack compose, how do we access things like view insets, context, etc?
a

Adam Bennett

10/23/2019, 11:46 PM
Looking at the tutorial, it looks like you can get a reference to
Context
like so:
val context = +ambient(ContextAmbient)
a

andrew

10/24/2019, 12:05 AM
Ah, that’s kinda neat
a

Adam Powell

10/24/2019, 1:01 AM
We still need to wire up some more things to the host view to make working with the insets nicer
a

andrew

10/24/2019, 9:51 PM
I suppose that would need to be added into the AndroidComposeView itself, maybe with a similar api to how you’d access context
a

Adam Powell

10/24/2019, 11:55 PM
Kind of, though I'd like to consider the whole insets situation a little more thoroughly too and look at improving that API UX along the way
2 Views