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

Big Chungus

02/15/2021, 6:31 PM
Is it possible to get parent Box width?
a

Adam Powell

02/15/2021, 6:32 PM
For what purpose? The optimal answer will vary based on whether you want to alter the composition itself vs. change layout or drawing based on that information.
b

Big Chungus

02/15/2021, 6:59 PM
I basically have a box with textfield and another box inside. I want inner box to be of x width (set by me) and match textField height (and in turn parent box's)
p

Piotr Prus

02/15/2021, 7:02 PM
Can you post an image to visualise it? 🙂
a

Adam Powell

02/15/2021, 7:24 PM
https://developer.android.com/codelabs/jetpack-compose-layouts#9 might be relevant but agreed, a quick sketch might help visualize it
b

Big Chungus

02/15/2021, 7:48 PM
IntrinsicSize was exactly what I needed
👍 2