I am new to compose and currently am facing problem when trying to create HorizontalPager
. Previously it was displayed so that pager item fills width and then height is same as width:
Surface(
modifier = Modifier
.fillMaxWidth()
.aspectRatio(1.0f),
elevation = 16.dp
) { ... }
Now I need to change it so that item still fills width but height wrap content and then every item's height is being evened out to heighest item. Also I would like minimum height be the same as width.
I found something like Intrinsic measurements but when tried to use it nothing happened:
Surface(
modifier = Modifier
.fillMaxWidth()
.height(IntrinsicSize.Min),
elevation = 16.dp
) { ... }
Also I have no idea how to set min height to be the same as width