I want to make circular intermediate progress bar in jetpack compose. I tried some piece of code but it's not working correctly to animate the circle. I tried this answer as well, but nothing works
val strokeWidth = dimensionResource(R.dimen.stroke)
Box(modifier = Modifier.fillMaxSize()) {
CircularProgressIndicator(
progress = .25f,
modifier = Modifier
.align(Alignment.Center)
.drawBehind {
drawCircle(
Cloudy,
radius = size.width / 2 - strokeWidth.toPx() / 2,
style = Stroke(strokeWidth.toPx())
)
},
color = Aqua,
strokeWidth = strokeWidth
)
}
Actual Output
The animation is not working
Expected Output