semoro
04/21/2020, 7:15 PMContentScale.FillWidth
? When image width is bigger then clip area
Image(
asset = image,
modifier = Modifier.clip(RoundedCornerShape(20.dp)),
contentScale = ContentScale.FillWidth
)
@Composable
fun ImgTest() {
VerticalScroller {
Column(Modifier.padding(10.dp).preferredWidth(100.dp)) {
Stack {
Image(
asset = vectorResource(id = R.drawable.vect),
contentScale = ContentScale.FillWidth,
modifier = Modifier.clip(RoundedCornerShape(20.dp))
)
Text(text = "FillWidth")
}
Divider()
Stack {
Image(
asset = vectorResource(id = R.drawable.vect),
contentScale = ContentScale.FillHeight,
modifier = Modifier.clip(RoundedCornerShape(20.dp))
)
Text(text = "FillHeight")
}
}
}
}