# CircularProgressIndicatorSpec

[View Source](https://github.com/material-components/material-components-android/blob/1.14.0/lib/java/com/google/android/material/progressindicator/CircularProgressIndicatorSpec.java)

*** ** * ** ***


```
public final class CircularProgressIndicatorSpec extends BaseProgressIndicatorSpec
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [com.google.android.material.progressindicator.BaseProgressIndicatorSpec](https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec) ||
|   | ↳ | [com.google.android.material.progressindicator.CircularProgressIndicatorSpec](https://developer.android.com/reference/com/google/android/material/progressindicator/CircularProgressIndicatorSpec) |

*** ** * ** ***

This class contains the parameters for drawing a circular type progress indicator. The parameters reflect the attributes defined in `R.styleable.BaseProgressIndicator` and `
R.styleable.CircularProgressIndicator`.

## Summary

| ### Public fields |
|---|---|
| `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/CircularProgressIndicatorSpec#indeterminateAnimationType()` |
| `boolean` | `https://developer.android.com/reference/com/google/android/material/progressindicator/CircularProgressIndicatorSpec#indeterminateTrackVisible()` Whether to show the track in the indeterminate mode. |
| `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/CircularProgressIndicatorSpec#indicatorDirection()` The direction in which the indicator will rotate and grow to. |
| `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/CircularProgressIndicatorSpec#indicatorInset()` The extra space from the outer edge of the indicator to the edge of the canvas. |
| `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/CircularProgressIndicatorSpec#indicatorSize()` The size (outer diameter) of the spinner. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/com/google/android/material/progressindicator/CircularProgressIndicatorSpec#CircularProgressIndicatorSpec(Context,AttributeSet)(Context context, AttributeSet attrs)` Instantiates the spec for `https://developer.android.com/reference/com/google/android/material/progressindicator/CircularProgressIndicator`. |
| `https://developer.android.com/reference/com/google/android/material/progressindicator/CircularProgressIndicatorSpec#CircularProgressIndicatorSpec(Context,AttributeSet,int)( Context context, AttributeSet attrs, int defStyleAttr )` |
| `https://developer.android.com/reference/com/google/android/material/progressindicator/CircularProgressIndicatorSpec#CircularProgressIndicatorSpec(Context,AttributeSet,int,int)( Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes )` |

| ### Inherited fields |
|---|
| From [com.google.android.material.progressindicator.BaseProgressIndicatorSpec](https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec) |---|---| | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#hideAnimationBehavior()` The animation behavior to hide the indicator and track. | | `float` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#indeterminateAnimatorDurationScale()` The scale of the animation duration in indeterminate mode. | | `int[]` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#indicatorColors()` The color array used in the indicator. | | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#indicatorTrackGapSize()` The size of the gap between the indicator and the rest of the track. | | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#showAnimationBehavior()` The animation behavior to show the indicator and track. | | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#trackColor()` The color used in the track. | | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#trackCornerRadius()` When this is greater than 0, the corners of both the track and the indicator will be rounded with this radius. | | `float` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#trackCornerRadiusFraction()` The fraction of the track thickness to be used as the corner radius. | | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#trackThickness()` The thickness of the track and indicator. | | `boolean` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#useRelativeTrackCornerRadius()` When this is true, the {#link trackCornerRadiusFraction} takes effect. | | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#waveAmplitude()` The size of the amplitude, if a wave effect is configured. | | `float` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#waveAmplitudeRampProgressMax()` The normalized progress, at which the full wave amplitude will be ramped down. | | `float` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#waveAmplitudeRampProgressMin()` The normalized progress, at which the full wave amplitude will be ramped up. | | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#waveSpeed()` The speed of the waveform, if a wave effect is configured. | | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#wavelengthDeterminate()` The size of the wavelength in determinate mode, if a wave effect is configured. | | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#wavelengthIndeterminate()` The size of the wavelength in indeterminate mode, if a wave effect is configured. | |

| ### Inherited methods |
|---|
| From [com.google.android.material.progressindicator.BaseProgressIndicatorSpec](https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec) |---|---| | `int` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#getTrackCornerRadiusInPx()()` Returns the track corner radius in pixels. | | `boolean` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#hasWavyEffect(boolean)(boolean isDeterminate)` | | `boolean` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#isHideAnimationEnabled()()` | | `boolean` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#isShowAnimationEnabled()()` | | `boolean` | `https://developer.android.com/reference/com/google/android/material/progressindicator/BaseProgressIndicatorSpec#useStrokeCap()()` Returns true if the stroke ROUND cap should be used to prevent artifacts like (b/319309456), when fully rounded corners are specified. | |

## Public fields

### indeterminateAnimationType

```
public int indeterminateAnimationType
```

### indeterminateTrackVisible

```
public boolean indeterminateTrackVisible
```

Whether to show the track in the indeterminate mode.

### indicatorDirection

```
public int indicatorDirection
```

The direction in which the indicator will rotate and grow to.

### indicatorInset

```
public int indicatorInset
```

The extra space from the outer edge of the indicator to the edge of the canvas.

### indicatorSize

```
public int indicatorSize
```

The size (outer diameter) of the spinner.

## Public constructors

### CircularProgressIndicatorSpec

```
public CircularProgressIndicatorSpec(Context context, AttributeSet attrs)
```

Instantiates the spec for `https://developer.android.com/reference/com/google/android/material/progressindicator/CircularProgressIndicator`.

If attributes in `R.styleable.CircularProgressIndicator` are missing, the values in the default style `Widget.MaterialComponents.CircularProgressIndicator` will be loaded. If attributes in `R.styleable.BaseProgressIndicator` are missing, the values in the default style `Widget.MaterialComponents.ProgressIndicator` will be loaded.

| Parameters |
|---|---|
| `Context context` | Current themed context. |
| `AttributeSet attrs` | Component's attributes set. |

### CircularProgressIndicatorSpec

```
public CircularProgressIndicatorSpec(
    Context context,
    AttributeSet attrs,
    int defStyleAttr
)
```

### CircularProgressIndicatorSpec

```
public CircularProgressIndicatorSpec(
    Context context,
    AttributeSet attrs,
    int defStyleAttr,
    int defStyleRes
)
```