Fudge
05/31/2019, 8:44 AMLayout(children = {Text("Hello")}, layoutBlock = { measurables, incomingConstraints ->
val sizeOfTheHelloText = /*calculate size*/
Draw {
/* draw some special border around the text */
}
}
Or
OnChildPositioned(onPositioned = { coords->
Draw {
/* draw some special border around the text */
}
}) {
Text("Hello")
}
The problem lies in Draw
, as 'there is no composition context' there. Getting the size of the text I managed to figure out how to do.
For context, I'm trying to make a button that fills up like a progress bar.Andrey Kulikov
05/31/2019, 9:05 AMAndrey Kulikov
05/31/2019, 9:05 AMAndrey Kulikov
05/31/2019, 9:06 AMFudge
05/31/2019, 9:06 AMAndrey Kulikov
05/31/2019, 9:06 AM