CircularProgressIndicatorSpec

public final class CircularProgressIndicatorSpec extends BaseProgressIndicatorSpec


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
boolean

Whether to show the track in the indeterminate mode.

int

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

int

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

int

The size (outer diameter) of the spinner.

Public constructors

CircularProgressIndicatorSpec(Context context, AttributeSet attrs)

Instantiates the spec for CircularProgressIndicator.

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

Inherited fields

From com.google.android.material.progressindicator.BaseProgressIndicatorSpec
int

The animation behavior to hide the indicator and track.

float

The scale of the animation duration in indeterminate mode.

int[]

The color array used in the indicator.

int

The size of the gap between the indicator and the rest of the track.

int

The animation behavior to show the indicator and track.

int

The color used in the track.

int

When this is greater than 0, the corners of both the track and the indicator will be rounded with this radius.

float

The fraction of the track thickness to be used as the corner radius.

int

The thickness of the track and indicator.

boolean

When this is true, the {#link trackCornerRadiusFraction} takes effect.

int

The size of the amplitude, if a wave effect is configured.

int

The speed of the waveform, if a wave effect is configured.

int

The size of the wavelength in determinate mode, if a wave effect is configured.

int

The size of the wavelength in indeterminate mode, if a wave effect is configured.

Inherited methods

From com.google.android.material.progressindicator.BaseProgressIndicatorSpec
int

Returns the track corner radius in pixels.

boolean
hasWavyEffect(boolean isDeterminate)
boolean
boolean
boolean

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 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
)