This library specifies a circular progress indicator background color in Compose version 1.4.0-alpha04 and earlier.
Add dependencies for Jitpack in build.gradle(project)
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add dependencies for libraries in build.gradle(module)
dependencies {
implementation 'com.github.JiSeokYeom:Compose_CircularProgressIndicator_Background:v[$LATEST_VERSION]'
}
@Composable
fun CustomCircularProgressIndicatorWithBackground(
modifier: Modifier = Modifier.size(100.dp),
progress: Float,
strokeColor: Color = MaterialTheme.colors.primary,
backgroundColor: Color = Color.Gray,
strokeWidth: Dp = 10.dp,
)
The default CircularProgressIndicator size is 100dp
modifier: Modifier = Modifier.size(100.dp)
This is a progress representing the current progress 0.1F - 10% 0.2F - 20% 0.3F - 30% ... ... 1F - 100% It can be expressed as above
progress: Float
A property that allows you to specify a strokeColor.By default, use MaterialTheme.colors.primary
strokeColor: Color = MaterialTheme.colors.primary
This property allows you to specify a background color, which is Gray by default
backgroundColor: Color = Color.Gray
Property that can specify strokeWidth, by default 10dp
strokeWidth: Dp = 10.dp
If you have any errors or questions, please leave them on the issue tab Thank you!