Issue
By default, Column {}
has the width of it's largest child element. How can I make all other elements to fit the width of the parent Column
? If I use Modifier.fillMaxWidth()
the elements will take up the entire available space and make the parent Column
larger. How can I achieve the same behavior like a Modifier.matchParentWidth()
Modifier would provide?
Solution
The solution is to leverage the power of intrinsic measurements.
Instead of using Modifier.fillMaxWidth()
we use height(IntrinsicSize.Min)
to match the width to the minimum width of the largest element
Answered By - Yannick
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.