# CircularProgressDrawable

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:swiperefreshlayout:28.0.0-alpha1  
Summary:[Constants](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#constants)\|[Ctors](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#pubctors)\|[Methods](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#)  

# CircularProgressDrawable

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


class
CircularProgressDrawable
`  
`


``

extends `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)`


``


implements

`[Animatable](https://developer.android.com/reference/android/graphics/drawable/Animatable.html)`


`

|---|---|----------------------------------------------------|
| java.lang.Object                                         |||
| ↳ | [android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) ||
|   | ↳ | android.support.v4.widget.CircularProgressDrawable |

<br />

*** ** * ** ***

Drawable that renders the animated indeterminate progress indicator in the Material design style without depending on API level 11.

While this may be used to draw an indeterminate spinner using[start()](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#start())and[stop()](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#stop())methods, this may also be used to draw a progress arc using[setStartEndTrim(float, float)](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setStartEndTrim(float, float))method. CircularProgressDrawable also supports adding an arrow at the end of the arc by[setArrowEnabled(boolean)](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setArrowEnabled(boolean))and[setArrowDimensions(float, float)](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setArrowDimensions(float, float))methods.

To use one of the pre-defined sizes instead of using your own,[setStyle(int)](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setStyle(int))should be called with one of the[DEFAULT](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#DEFAULT)or[LARGE](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#LARGE)styles as its parameter. Doing it so will update the arrow dimensions, ring size and stroke width to fit the one specified.

If no center radius is set via[setCenterRadius(float)](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setCenterRadius(float))or[setStyle(int)](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setStyle(int))methods, CircularProgressDrawable will fill the bounds set via[setBounds(Rect)](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setBounds(android.graphics.Rect)).

## Summary

|                                                                      ### Constants                                                                      ||
|-------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [DEFAULT](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#DEFAULT) Maps to ProgressBar default style. |
| `int` | [LARGE](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#LARGE) Maps to ProgressBar.Large style.       |

|                                                                                                                           ### Public constructors                                                                                                                            ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[CircularProgressDrawable](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#CircularProgressDrawable(android.content.Context))`(`[Context](https://developer.android.com/reference/android/content/Context.html)` context) ` |

|                                                                                                                                                                                        ### Public methods                                                                                                                                                                                         ||
|-----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void`                                                                                 | ` `[draw](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#draw(android.graphics.Canvas))`(`[Canvas](https://developer.android.com/reference/android/graphics/Canvas.html)` canvas) `                                                                          |
| ` int`                                                                                  | ` `[getAlpha](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#getAlpha())`() `                                                                                                                                                                                |
| ` boolean`                                                                              | ` `[getArrowEnabled](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#getArrowEnabled())`() ` Returns`true`if the arrow at the end of the spinner is shown.                                                                                                    |
| ` float`                                                                                | ` `[getArrowHeight](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#getArrowHeight())`() ` Returns the arrow height in pixels.                                                                                                                                |
| ` float`                                                                                | ` `[getArrowScale](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#getArrowScale())`() ` Returns the scale of the arrow at the end of the spinner.                                                                                                            |
| ` float`                                                                                | ` `[getArrowWidth](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#getArrowWidth())`() ` Returns the arrow width in pixels.                                                                                                                                   |
| ` int`                                                                                  | ` `[getBackgroundColor](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#getBackgroundColor())`() ` Returns the background color of the circle drawn inside the drawable.                                                                                      |
| ` float`                                                                                | ` `[getCenterRadius](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#getCenterRadius())`() ` Returns the center radius for the progress spinner in pixels.                                                                                                    |
| ` int[]`                                                                                | ` `[getColorSchemeColors](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#getColorSchemeColors())`() ` Returns the colors used in the progress animation                                                                                                      |
| ` float`                                                                                | ` `[getEndTrim](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#getEndTrim())`() ` Returns the end trim for the progress spinner arc                                                                                                                          |
| ` int`                                                                                  | ` `[getOpacity](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#getOpacity())`() `                                                                                                                                                                            |
| ` float`                                                                                | ` `[getProgressRotation](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#getProgressRotation())`() ` Returns the amount of rotation applied to the progress spinner.                                                                                          |
| ` float`                                                                                | ` `[getStartTrim](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#getStartTrim())`() ` Returns the start trim for the progress spinner arc                                                                                                                    |
| ` `[Paint.Cap](https://developer.android.com/reference/android/graphics/Paint.Cap.html) | ` `[getStrokeCap](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#getStrokeCap())`() ` Returns the stroke cap of the progress spinner.                                                                                                                        |
| ` float`                                                                                | ` `[getStrokeWidth](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#getStrokeWidth())`() ` Returns the stroke width for the progress spinner in pixels.                                                                                                       |
| ` boolean`                                                                              | ` `[isRunning](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#isRunning())`() `                                                                                                                                                                              |
| ` void`                                                                                 | ` `[setAlpha](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setAlpha(int))`(int alpha) `                                                                                                                                                                    |
| ` void`                                                                                 | ` `[setArrowDimensions](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setArrowDimensions(float, float))`(float width, float height) ` Sets the dimensions of the arrow at the end of the spinner in pixels.                                                 |
| ` void`                                                                                 | ` `[setArrowEnabled](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setArrowEnabled(boolean))`(boolean show) ` Sets if the arrow at the end of the spinner should be shown.                                                                                  |
| ` void`                                                                                 | ` `[setArrowScale](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setArrowScale(float))`(float scale) ` Sets the scale of the arrow at the end of the spinner.                                                                                               |
| ` void`                                                                                 | ` `[setBackgroundColor](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setBackgroundColor(int))`(int color) ` Sets the background color of the circle inside the drawable.                                                                                   |
| ` void`                                                                                 | ` `[setCenterRadius](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setCenterRadius(float))`(float centerRadius) ` Sets the center radius for the progress spinner in pixels.                                                                                |
| ` void`                                                                                 | ` `[setColorFilter](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setColorFilter(android.graphics.ColorFilter))`(`[ColorFilter](https://developer.android.com/reference/android/graphics/ColorFilter.html)` colorFilter) `                                  |
| ` void`                                                                                 | ` `[setColorSchemeColors](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setColorSchemeColors(int...))`(int... colors) ` Sets the colors used in the progress animation from a color list.                                                                   |
| ` void`                                                                                 | ` `[setProgressRotation](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setProgressRotation(float))`(float rotation) ` Sets the amount of rotation to apply to the progress spinner.                                                                         |
| ` void`                                                                                 | ` `[setStartEndTrim](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setStartEndTrim(float, float))`(float start, float end) ` Sets the start and end trim for the progress spinner arc.                                                                      |
| ` void`                                                                                 | ` `[setStrokeCap](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setStrokeCap(android.graphics.Paint.Cap))`(`[Paint.Cap](https://developer.android.com/reference/android/graphics/Paint.Cap.html)` strokeCap) ` Sets the stroke cap of the progress spinner. |
| ` void`                                                                                 | ` `[setStrokeWidth](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setStrokeWidth(float))`(float strokeWidth) ` Sets the stroke width for the progress spinner in pixels.                                                                                    |
| ` void`                                                                                 | ` `[setStyle](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setStyle(int))`(int size) ` Sets the overall size for the progress spinner.                                                                                                                     |
| ` void`                                                                                 | ` `[start](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#start())`() ` Starts the animation for the spinner.                                                                                                                                                |
| ` void`                                                                                 | ` `[stop](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#stop())`() ` Stops the animation for the spinner.                                                                                                                                                   |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#)From class` `[android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` ` |----------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` void`                                                                                                                    | ` applyTheme(`[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` arg0) `                                                                                                                                                                                                                                                  | | ` boolean`                                                                                                                 | ` canApplyTheme() `                                                                                                                                                                                                                                                                                                                                                         | | ` void`                                                                                                                    | ` clearColorFilter() `                                                                                                                                                                                                                                                                                                                                                      | | ` final `[Rect](https://developer.android.com/reference/android/graphics/Rect.html)                                        | ` copyBounds() `                                                                                                                                                                                                                                                                                                                                                            | | ` final void`                                                                                                              | ` copyBounds(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                           | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromPath(String arg0) `                                                                                                                                                                                                                                                                                                                                             | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromResourceStream(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, `[TypedValue](https://developer.android.com/reference/android/util/TypedValue.html)` arg1, InputStream arg2, String arg3, `[BitmapFactory.Options](https://developer.android.com/reference/android/graphics/BitmapFactory.Options.html)` arg4) ` | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromResourceStream(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, `[TypedValue](https://developer.android.com/reference/android/util/TypedValue.html)` arg1, InputStream arg2, String arg3) `                                                                                                                      | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromStream(InputStream arg0, String arg1) `                                                                                                                                                                                                                                                                                                                         | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromXml(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1) `                                                                                                                                                                                                                                       | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromXml(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` arg2) `                                                                                                                           | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromXmlInner(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg2, `[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` arg3) `                       | | ` static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                      | ` createFromXmlInner(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg2) `                                                                                                                                   | | ` abstract void`                                                                                                           | ` draw(`[Canvas](https://developer.android.com/reference/android/graphics/Canvas.html)` arg0) `                                                                                                                                                                                                                                                                             | | ` int`                                                                                                                     | ` getAlpha() `                                                                                                                                                                                                                                                                                                                                                              | | ` final `[Rect](https://developer.android.com/reference/android/graphics/Rect.html)                                        | ` getBounds() `                                                                                                                                                                                                                                                                                                                                                             | | ` `[Drawable.Callback](https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html)           | ` getCallback() `                                                                                                                                                                                                                                                                                                                                                           | | ` int`                                                                                                                     | ` getChangingConfigurations() `                                                                                                                                                                                                                                                                                                                                             | | ` `[ColorFilter](https://developer.android.com/reference/android/graphics/ColorFilter.html)                                | ` getColorFilter() `                                                                                                                                                                                                                                                                                                                                                        | | ` `[Drawable.ConstantState](https://developer.android.com/reference/android/graphics/drawable/Drawable.ConstantState.html) | ` getConstantState() `                                                                                                                                                                                                                                                                                                                                                      | | ` `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                             | ` getCurrent() `                                                                                                                                                                                                                                                                                                                                                            | | ` `[Rect](https://developer.android.com/reference/android/graphics/Rect.html)                                              | ` getDirtyBounds() `                                                                                                                                                                                                                                                                                                                                                        | | ` void`                                                                                                                    | ` getHotspotBounds(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                     | | ` int`                                                                                                                     | ` getIntrinsicHeight() `                                                                                                                                                                                                                                                                                                                                                    | | ` int`                                                                                                                     | ` getIntrinsicWidth() `                                                                                                                                                                                                                                                                                                                                                     | | ` int`                                                                                                                     | ` getLayoutDirection() `                                                                                                                                                                                                                                                                                                                                                    | | ` final int`                                                                                                               | ` getLevel() `                                                                                                                                                                                                                                                                                                                                                              | | ` int`                                                                                                                     | ` getMinimumHeight() `                                                                                                                                                                                                                                                                                                                                                      | | ` int`                                                                                                                     | ` getMinimumWidth() `                                                                                                                                                                                                                                                                                                                                                       | | ` abstract int`                                                                                                            | ` getOpacity() `                                                                                                                                                                                                                                                                                                                                                            | | ` void`                                                                                                                    | ` getOutline(`[Outline](https://developer.android.com/reference/android/graphics/Outline.html)` arg0) `                                                                                                                                                                                                                                                                     | | ` boolean`                                                                                                                 | ` getPadding(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                           | | ` int[]`                                                                                                                   | ` getState() `                                                                                                                                                                                                                                                                                                                                                              | | ` `[Region](https://developer.android.com/reference/android/graphics/Region.html)                                          | ` getTransparentRegion() `                                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                                                    | ` inflate(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg2, `[Resources.Theme](https://developer.android.com/reference/android/content/res/Resources.Theme.html)` arg3) `                                  | | ` void`                                                                                                                    | ` inflate(`[Resources](https://developer.android.com/reference/android/content/res/Resources.html)` arg0, XmlPullParser arg1, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg2) `                                                                                                                                              | | ` void`                                                                                                                    | ` invalidateSelf() `                                                                                                                                                                                                                                                                                                                                                        | | ` boolean`                                                                                                                 | ` isAutoMirrored() `                                                                                                                                                                                                                                                                                                                                                        | | ` boolean`                                                                                                                 | ` isFilterBitmap() `                                                                                                                                                                                                                                                                                                                                                        | | ` boolean`                                                                                                                 | ` isStateful() `                                                                                                                                                                                                                                                                                                                                                            | | ` final boolean`                                                                                                           | ` isVisible() `                                                                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                                                    | ` jumpToCurrentState() `                                                                                                                                                                                                                                                                                                                                                    | | ` `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)                             | ` mutate() `                                                                                                                                                                                                                                                                                                                                                                | | ` void`                                                                                                                    | ` onBoundsChange(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                       | | ` boolean`                                                                                                                 | ` onLayoutDirectionChanged(int arg0) `                                                                                                                                                                                                                                                                                                                                      | | ` boolean`                                                                                                                 | ` onLevelChange(int arg0) `                                                                                                                                                                                                                                                                                                                                                 | | ` boolean`                                                                                                                 | ` onStateChange(int[] arg0) `                                                                                                                                                                                                                                                                                                                                               | | ` static int`                                                                                                              | ` resolveOpacity(int arg0, int arg1) `                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                                                    | ` scheduleSelf(Runnable arg0, long arg1) `                                                                                                                                                                                                                                                                                                                                  | | ` abstract void`                                                                                                           | ` setAlpha(int arg0) `                                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                                                    | ` setAutoMirrored(boolean arg0) `                                                                                                                                                                                                                                                                                                                                           | | ` void`                                                                                                                    | ` setBounds(int arg0, int arg1, int arg2, int arg3) `                                                                                                                                                                                                                                                                                                                       | | ` void`                                                                                                                    | ` setBounds(`[Rect](https://developer.android.com/reference/android/graphics/Rect.html)` arg0) `                                                                                                                                                                                                                                                                            | | ` final void`                                                                                                              | ` setCallback(`[Drawable.Callback](https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html)` arg0) `                                                                                                                                                                                                                                       | | ` void`                                                                                                                    | ` setChangingConfigurations(int arg0) `                                                                                                                                                                                                                                                                                                                                     | | ` void`                                                                                                                    | ` setColorFilter(int arg0, `[PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)` arg1) `                                                                                                                                                                                                                                       | | ` abstract void`                                                                                                           | ` setColorFilter(`[ColorFilter](https://developer.android.com/reference/android/graphics/ColorFilter.html)` arg0) `                                                                                                                                                                                                                                                         | | ` void`                                                                                                                    | ` setDither(boolean arg0) `                                                                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                                                    | ` setFilterBitmap(boolean arg0) `                                                                                                                                                                                                                                                                                                                                           | | ` void`                                                                                                                    | ` setHotspot(float arg0, float arg1) `                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                                                    | ` setHotspotBounds(int arg0, int arg1, int arg2, int arg3) `                                                                                                                                                                                                                                                                                                                | | ` final boolean`                                                                                                           | ` setLayoutDirection(int arg0) `                                                                                                                                                                                                                                                                                                                                            | | ` final boolean`                                                                                                           | ` setLevel(int arg0) `                                                                                                                                                                                                                                                                                                                                                      | | ` boolean`                                                                                                                 | ` setState(int[] arg0) `                                                                                                                                                                                                                                                                                                                                                    | | ` void`                                                                                                                    | ` setTint(int arg0) `                                                                                                                                                                                                                                                                                                                                                       | | ` void`                                                                                                                    | ` setTintList(`[ColorStateList](https://developer.android.com/reference/android/content/res/ColorStateList.html)` arg0) `                                                                                                                                                                                                                                                   | | ` void`                                                                                                                    | ` setTintMode(`[PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)` arg0) `                                                                                                                                                                                                                                                    | | ` boolean`                                                                                                                 | ` setVisible(boolean arg0, boolean arg1) `                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                                                    | ` unscheduleSelf(Runnable arg0) `                                                                                                                                                                                                                                                                                                                                           | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#)From interface` `[android.graphics.drawable.Animatable](https://developer.android.com/reference/android/graphics/drawable/Animatable.html)` ` |---------------------|-----------------| | ` abstract boolean` | ` isRunning() ` | | ` abstract void`    | ` start() `     | | ` abstract void`    | ` stop() `      | ||

## Constants

### DEFAULT

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int DEFAULT
```

Maps to ProgressBar default style.

<br />

Constant Value: 1 (0x00000001)  

### LARGE

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int LARGE
```

Maps to ProgressBar.Large style.

<br />

Constant Value: 0 (0x00000000)

## Public constructors

### CircularProgressDrawable

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
CircularProgressDrawable (Context context)
```

<br />

<br />

|                    Parameters                    ||
|-----------|---------------------------------------|
| `context` | `Context`: application context <br /> |

## Public methods

### draw

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void draw (Canvas canvas)
```

<br />

<br />

|        Parameters         ||
|----------|-----------------|
| `canvas` | `Canvas` <br /> |

### getAlpha

```
int getAlpha ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getArrowEnabled

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean getArrowEnabled ()
```

Returns`true`if the arrow at the end of the spinner is shown.

<br />

|                             Returns                             ||
|-----------|------------------------------------------------------|
| `boolean` | `true`if the arrow is shown,`false`otherwise. <br /> |

### getArrowHeight

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float getArrowHeight ()
```

Returns the arrow height in pixels.

<br />

|                Returns                 ||
|---------|-------------------------------|
| `float` | arrow height in pixels <br /> |

### getArrowScale

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float getArrowScale ()
```

Returns the scale of the arrow at the end of the spinner.

<br />

|              Returns               ||
|---------|---------------------------|
| `float` | scale of the arrow <br /> |

### getArrowWidth

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float getArrowWidth ()
```

Returns the arrow width in pixels.

<br />

|                Returns                ||
|---------|------------------------------|
| `float` | arrow width in pixels <br /> |

### getBackgroundColor

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getBackgroundColor ()
```

Returns the background color of the circle drawn inside the drawable.

<br />

|           Returns           ||
|-------|----------------------|
| `int` | an ARGB color <br /> |

### getCenterRadius

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float getCenterRadius ()
```

Returns the center radius for the progress spinner in pixels.

<br />

|                 Returns                 ||
|---------|--------------------------------|
| `float` | center radius in pixels <br /> |

### getColorSchemeColors

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int[] getColorSchemeColors ()
```

Returns the colors used in the progress animation

<br />

|               Returns               ||
|---------|----------------------------|
| `int[]` | list of ARGB colors <br /> |

### getEndTrim

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float getEndTrim ()
```

Returns the end trim for the progress spinner arc

<br />

|                Returns                 ||
|---------|-------------------------------|
| `float` | end trim from \[0..1\] <br /> |

### getOpacity

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getOpacity ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getProgressRotation

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float getProgressRotation ()
```

Returns the amount of rotation applied to the progress spinner.

<br />

|                     Returns                      ||
|---------|-----------------------------------------|
| `float` | amount of rotation from \[0..1\] <br /> |

### getStartTrim

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float getStartTrim ()
```

Returns the start trim for the progress spinner arc

<br />

|                 Returns                  ||
|---------|---------------------------------|
| `float` | start trim from \[0..1\] <br /> |

### getStrokeCap

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Paint.Cap getStrokeCap ()
```

Returns the stroke cap of the progress spinner.

<br />

|                                                 Returns                                                 ||
|--------------------------------------------------------------------------------------|-------------------|
| [Paint.Cap](https://developer.android.com/reference/android/graphics/Paint.Cap.html) | stroke cap <br /> |

### getStrokeWidth

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
float getStrokeWidth ()
```

Returns the stroke width for the progress spinner in pixels.

<br />

|                Returns                 ||
|---------|-------------------------------|
| `float` | stroke width in pixels <br /> |

### isRunning

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean isRunning ()
```

<br />

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### setAlpha

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setAlpha (int alpha)
```

<br />

<br />

|      Parameters       ||
|---------|--------------|
| `alpha` | `int` <br /> |

### setArrowDimensions

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setArrowDimensions (float width, 
                float height)
```

Sets the dimensions of the arrow at the end of the spinner in pixels.

<br />

|                                     Parameters                                     ||
|----------|--------------------------------------------------------------------------|
| `width`  | `float`: width of the baseline of the arrow in pixels <br />             |
| `height` | `float`: distance from tip of the arrow to its baseline in pixels <br /> |

### setArrowEnabled

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setArrowEnabled (boolean show)
```

Sets if the arrow at the end of the spinner should be shown.

<br />

|                                  Parameters                                  ||
|--------|----------------------------------------------------------------------|
| `show` | `boolean`:`true`if the arrow should be drawn,`false`otherwise <br /> |

### setArrowScale

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setArrowScale (float scale)
```

Sets the scale of the arrow at the end of the spinner.

<br />

|                                                Parameters                                                ||
|---------|-------------------------------------------------------------------------------------------------|
| `scale` | `float`: scaling that will be applied to the arrow's both width and height when drawing. <br /> |

### setBackgroundColor

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setBackgroundColor (int color)
```

Sets the background color of the circle inside the drawable. Calling[setAlpha(int)](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#setAlpha(int))does not affect the visibility background color, so it should be set separately if it needs to be hidden or visible.

<br />

|              Parameters              ||
|---------|-----------------------------|
| `color` | `int`: an ARGB color <br /> |

### setCenterRadius

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setCenterRadius (float centerRadius)
```

Sets the center radius for the progress spinner in pixels. If set to 0, this drawable will fill the bounds when drawn.

<br />

|                       Parameters                        ||
|----------------|-----------------------------------------|
| `centerRadius` | `float`: center radius in pixels <br /> |

### setColorFilter

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setColorFilter (ColorFilter colorFilter)
```

<br />

<br />

|             Parameters              ||
|---------------|----------------------|
| `colorFilter` | `ColorFilter` <br /> |

### setColorSchemeColors

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setColorSchemeColors (int... colors)
```

Sets the colors used in the progress animation from a color list. The first color will also be the color to be used if animation is not started yet.

<br />

|                              Parameters                               ||
|----------|-------------------------------------------------------------|
| `colors` | `int`: list of ARGB colors to be used in the spinner <br /> |

### setProgressRotation

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setProgressRotation (float rotation)
```

Sets the amount of rotation to apply to the progress spinner.

<br />

|                     Parameters                     ||
|------------|----------------------------------------|
| `rotation` | `float`: rotation from \[0..1\] <br /> |

### setStartEndTrim

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setStartEndTrim (float start, 
                float end)
```

Sets the start and end trim for the progress spinner arc. 0 corresponds to the geometric angle of 0 degrees (3 o'clock on a watch) and it increases clockwise, coming to a full circle at 1.

<br />

|                             Parameters                              ||
|---------|------------------------------------------------------------|
| `start` | `float`: starting position of the arc from \[0..1\] <br /> |
| `end`   | `float`: ending position of the arc from \[0..1\] <br />   |

### setStrokeCap

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setStrokeCap (Paint.Cap strokeCap)
```

Sets the stroke cap of the progress spinner. Default stroke cap is[SQUARE](https://developer.android.com/reference/android/graphics/Paint.Cap.html#SQUARE).

<br />

|                 Parameters                  ||
|-------------|--------------------------------|
| `strokeCap` | `Paint.Cap`: stroke cap <br /> |

### setStrokeWidth

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setStrokeWidth (float strokeWidth)
```

Sets the stroke width for the progress spinner in pixels.

<br />

|                      Parameters                       ||
|---------------|----------------------------------------|
| `strokeWidth` | `float`: stroke width in pixels <br /> |

### setStyle

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setStyle (int size)
```

Sets the overall size for the progress spinner. This updates the radius and stroke width of the ring, and arrow dimensions.

<br />

|                                                                                                                      Parameters                                                                                                                      ||
|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `size` | `int`: one of[LARGE](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#LARGE)or[DEFAULT](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable#DEFAULT) <br /> |

### start

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void start ()
```

Starts the animation for the spinner.

<br />

### stop

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void stop ()
```

Stops the animation for the spinner.

<br />

-

  ## Interfaces

  - [DrawerLayout.DrawerListener](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener)
  - [NestedScrollView.OnScrollChangeListener](https://developer.android.com/reference/android/support/v4/widget/NestedScrollView.OnScrollChangeListener)
  - [SimpleCursorAdapter.CursorToStringConverter](https://developer.android.com/reference/android/support/v4/widget/SimpleCursorAdapter.CursorToStringConverter)
  - [SimpleCursorAdapter.ViewBinder](https://developer.android.com/reference/android/support/v4/widget/SimpleCursorAdapter.ViewBinder)
  - [SlidingPaneLayout.PanelSlideListener](https://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.PanelSlideListener)
  - [SwipeRefreshLayout.OnChildScrollUpCallback](https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.OnChildScrollUpCallback)
  - [SwipeRefreshLayout.OnRefreshListener](https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.OnRefreshListener)
  - [TintableCompoundButton](https://developer.android.com/reference/android/support/v4/widget/TintableCompoundButton)
-

  ## Classes

  - [AutoScrollHelper](https://developer.android.com/reference/android/support/v4/widget/AutoScrollHelper)
  - [CircularProgressDrawable](https://developer.android.com/reference/android/support/v4/widget/CircularProgressDrawable)
  - [CompoundButtonCompat](https://developer.android.com/reference/android/support/v4/widget/CompoundButtonCompat)
  - [ContentLoadingProgressBar](https://developer.android.com/reference/android/support/v4/widget/ContentLoadingProgressBar)
  - [CursorAdapter](https://developer.android.com/reference/android/support/v4/widget/CursorAdapter)
  - [DrawerLayout](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout)
  - [DrawerLayout.LayoutParams](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.LayoutParams)
  - [DrawerLayout.SavedState](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.SavedState)
  - [DrawerLayout.SimpleDrawerListener](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.SimpleDrawerListener)
  - [EdgeEffectCompat](https://developer.android.com/reference/android/support/v4/widget/EdgeEffectCompat)
  - [ExploreByTouchHelper](https://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper)
  - [ImageViewCompat](https://developer.android.com/reference/android/support/v4/widget/ImageViewCompat)
  - [ListPopupWindowCompat](https://developer.android.com/reference/android/support/v4/widget/ListPopupWindowCompat)
  - [ListViewAutoScrollHelper](https://developer.android.com/reference/android/support/v4/widget/ListViewAutoScrollHelper)
  - [ListViewCompat](https://developer.android.com/reference/android/support/v4/widget/ListViewCompat)
  - [NestedScrollView](https://developer.android.com/reference/android/support/v4/widget/NestedScrollView)
  - [PopupMenuCompat](https://developer.android.com/reference/android/support/v4/widget/PopupMenuCompat)
  - [PopupWindowCompat](https://developer.android.com/reference/android/support/v4/widget/PopupWindowCompat)
  - [ResourceCursorAdapter](https://developer.android.com/reference/android/support/v4/widget/ResourceCursorAdapter)
  - [ScrollerCompat](https://developer.android.com/reference/android/support/v4/widget/ScrollerCompat)
  - [SimpleCursorAdapter](https://developer.android.com/reference/android/support/v4/widget/SimpleCursorAdapter)
  - [SlidingPaneLayout](https://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout)
  - [SlidingPaneLayout.LayoutParams](https://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.LayoutParams)
  - [SlidingPaneLayout.SimplePanelSlideListener](https://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.SimplePanelSlideListener)
  - [Space](https://developer.android.com/reference/android/support/v4/widget/Space)
  - [SwipeRefreshLayout](https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout)
  - [TextViewCompat](https://developer.android.com/reference/android/support/v4/widget/TextViewCompat)
  - [ViewDragHelper](https://developer.android.com/reference/android/support/v4/widget/ViewDragHelper)
  - [ViewDragHelper.Callback](https://developer.android.com/reference/android/support/v4/widget/ViewDragHelper.Callback)