I need to build a LazyRow with each item width be a percentage of the parent. Something like: ItemWidth = parentWidth/x. How can i get access to parentWidth and try to accomplish this? Any advice
t
Tgo1014
01/06/2022, 10:32 AM
Make the parent as
BoxWithConstraints
and use the width?
m
myanmarking
01/06/2022, 12:20 PM
ya. thanks!
z
Zoltan Demant
01/06/2022, 1:13 PM
LazyItemScope also has the following!
Copy code
fun Modifier.fillParentMaxSize(
/*@FloatRange(from = 0.0, to = 1.0)*/
fraction: Float = 1f
): Modifier