Need help with SmoothProgressBar?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

4.4K Stars 1.0K Forks Apache License 2.0 173 Commits 13 Opened issues


A small Android library allowing you to have a smooth and customizable horizontal or circular indeterminate ProgressBar

Services available


Need anything else?

Contributors list


Small library allowing you to make a smooth indeterminate progress bar. You can either user your progress bars and set this drawable or use directly the



Sample app available on the Play Store


How does it work

I wrote a blog post about that.


SmoothProgressBar (min API 7): Maven Central

CircularProgressBar (min API 14): Maven Central

The lib is now on Maven Central. All you have to do is add it on your gradle build:

dependencies {
    // of course, do not write x.x.x but the version number
    implementation 'com.github.castorflex.smoothprogressbar:library:x.x.x'
    // or
    implementation 'com.github.castorflex.smoothprogressbar:library-circular:x.x.x'

You can find the last stable version on Gradle Please

Or you can try the latest snapshots:

repositories {
    maven { url "" }

dependencies { implementation 'com.github.castorflex.smoothprogressbar:library:1.4.0-SNAPSHOT' implementation 'com.github.castorflex.smoothprogressbar:library-circular:1.4.0-SNAPSHOT' }

If you really want (or have) to use Eclipse, please look at the forks.


  • Use directly SmoothProgressBar:

< xmlns:android="" xmlns:app="" android:layout_width="match_parent" android:layout_height="wrap_content" android:indeterminate="true" app:cpb_color="#FFee44" app:cpb_colors="@array/mycolors" app:cpb_rotation_speed="1.0" app:cpb_sweep_speed="1.0" app:cpb_stroke_width="4dp" app:cpb_min_sweep_angle="10" app:cpb_max_sweep_angle="300"></>

Or use styles:

You can find more styles in the sample app

  • Or instantiate a
    and set it to your ProgressBar
mProgressBar.setIndeterminateDrawable(new SmoothProgressDrawable.Builder(context)
    .interpolator(new DecelerateInterpolator())
    .separatorLength(8)         //You should use Resources#getDimensionPixelSize
    .strokeWidth(8f)            //You should use Resources#getDimension
    .speed(2f)                 //2 times faster
    .progressiveStopEndedListener(mListener) //called when the stop animation is over

mProgressBar.setIndeterminateDrawable(new CircularProgressDrawable .Builder(this) .colors(getResources().getIntArray(R.array.gplus_colors)) .sweepSpeed(1f) .strokeWidth(mStrokeWidth) .style(CircularProgressDrawable.Style.ROUNDED) [ ... ] .build();

You can also set many colors for one bar (see G+ app)

  • via xml (use the

    attribute with a
    reference for that)
  • programmatically (use



Copyright 2014 Antoine Merle

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


CI master:

CI dev:

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.