Kshitij Patil
02/20/2021, 6:15 AMSubComposeLayout
. The compose sample has given sort of Scaffold of it and I’m not able not understand its usage from it. The layout I’m trying to build is as follows: my approach was to use Text
as “mainContent” and pass its dimensions to a Canvas
“dependentContent” to draw those accompanying lines. Any other suggestions/approaches are welcomeAlbert Chang
02/20/2021, 11:55 AMSubcomposeLayout
. You may want to check intrinsics: https://developer.android.com/codelabs/jetpack-compose-layouts#9.Kshitij Patil
02/20/2021, 12:16 PMText
dimensions before drawing the first line itself. Could you share some snippet/pseudocode to show your idea?
Thanks!Albert Chang
02/20/2021, 12:36 PMRow(verticalAlignment = Alignment.CenterVertically) {
Divider(modifier = Modifier.weight(1f))
Text(text = "Food")
Divider(modifier = Modifier.weight(1f))
}