Is there a way to tell an Image to be round?
# compose
g
Is there a way to tell an Image to be round?
b
Like rounded corners?
g
Yes! To make it a circle, basically
b
I think you achieve this using the modifier parameter
e
Copy code
@Composable
fun Picture(imageRes: Int) {
    val image = imageResource(id = imageRes)
    val pictureModifier = Modifier
            .padding(10.dp)
            .clip(androidx.ui.foundation.shape.corner.CircleShape)
            .preferredSize(200.dp)

    Image(
        asset = image,
        modifier = pictureModifier
    )
}
You have just to clip the image with the circle shape, like in this code
g
Thank you! I was wondering how the Modifier is called!