https://kotlinlang.org logo
Title
t

theapache64

01/27/2023, 9:15 AM
I was looking through my compose trace, and found that, after a recomposition, there’s a “traversal” calls which showing “LinearLayout -> FrameLayout -> ContentFrameLayout etc”.. Why’s this happening? Why am seeing views in recompose block when I don’t have any
AndroidViews
anywhere ? 🤔
g

gildor

01/27/2023, 9:20 AM
Window frame and activity content, those are views
It looks that those are part of AndroidComposeView
t

theapache64

01/27/2023, 9:21 AM
So when I access some activity, window thing from compose context, it goes through the
AndroidComposeView
? Is that what you’re saying?
g

gildor

01/27/2023, 9:22 AM
Composable should draw somehow and Android is based on Activity which renders in window and uses View as root
So ComposeActivity uses AndroidComposeView to render composablew which itself is a part of Activity hierarchy
t

theapache64

01/27/2023, 9:25 AM
understood 👍
Any idea why all
doFrame
calls come under
animation
block ?
g

gildor

01/27/2023, 9:27 AM
Nope
but just a guess, isn’t systrace just show different operations like this, so it shows that animation is happening during doFrame (which makes sense)
t

theapache64

01/27/2023, 9:28 AM
all doFrames call has animation blocks under it. even if there’s no animation we’re doing from compass side.
g

gildor

01/27/2023, 9:29 AM
Not an expert in systrace, but it looks that this what compose runtime reports to systrace: