I know you can draw a circle in Jetpack Compose and Canvas using simple methods. I tried drawing a colored circle and another smaller white circle to achieve a ring but it doesn't seem right. What if the background is not white or the ring shape should drawn on other things and the inside of it needs to be really hollow?
Surface {
Canvas(
modifier = Modifier.size(200.dp),
onDraw = {
drawCircle(
color = Color.Blue,
radius = 200f
)
drawCircle(
color = Color.White,
radius = 150f
)
}
)
}
You can set style as
Stroke
to draw a non-filled shape.