Reputation: 109
I want to make a circular filled progress bar in Android Studio. My goal is to achieve something like this;
The first image would have the progress value of for example, 100, then every second a bit of the circle will disappear until its nothing left.
I tried this but I couldn't get my repositories to work, therefore I'm looking for a more "non external" way to do it.
Upvotes: 1
Views: 739
Reputation: 363707
With the Material Components library you can use the official CircularProgressIndicator
.
Something like:
<com.google.android.material.progressindicator.CircularProgressIndicator
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:trackThickness="20dp"
/>
If you are using jetpack Compose you can use CircularProgressIndicator
:
CircularProgressIndicator(
strokeWidth = 20.dp,
progress = animatedProgress.value)
Upvotes: 2