What I want: I want every image to fit as much as it can in the scrollable column. so the image fit the maximum width it can and the height respectively. I can't figure out how to do this in compose.
What I tried: I only succeed to do this by using a fixed size for the image but this isn't really a solution.
Column(modifier = Modifier.fillMaxSize().background(Color.Blue)) {
Text(text = "text")
Column(modifier = Modifier
.verticalScroll(rememberScrollState())
.fillMaxSize()
.background(Color.Red)) {
Image(painter = painterResource(id = R.drawable.1),
contentDescription = null,
modifier = Modifier.size(640.dp)
)
Button(onClick = { /*TODO*/ }) {}
Button(onClick = { /*TODO*/ }) {}
Button(onClick = { /*TODO*/ }) {}
Button(onClick = { /*TODO*/ }) {}
}
Button(onClick = { /*TODO*/ }) {}
}