https://kotlinlang.org logo
#compose
Title
# compose
b

Brady Aiello

01/12/2020, 12:25 AM
Is there any way to inspect the "view hierarchy"? I know there is no view hierarchy so to speak, as it doesn't use views, but is there some sort of inspectable representation of the Composable function calls and their arguments used to render the UI? I'm asking chiefly programmatically, but I'm also wondering if a future version of the layout inspector will support Compose?
a

Adam Powell

01/12/2020, 12:42 AM
Yes, the layout inspector will support it. We need to emit some more metadata during the composition process to support it but it's on the list
We're also looking to hook it up to the usual show layout bounds settings and so on
It's not there yet but ideally I'd like it to show the tree of calls that produced the UI, and let you jump through the code that produced it at each node
😍 1
b

Brady Aiello

01/12/2020, 1:08 AM
Awesome!
z

Zach Klippenstein (he/him) [MOD]

01/12/2020, 1:46 AM
Similar to the Flutter tooling?
4 Views