Android 12 Developer Preview is here! Try it out, and give us your feedback!

BaseProgressIndicatorSpec

public abstract class BaseProgressIndicatorSpec
extends Object

java.lang.Object
   ↳ com.google.android.material.progressindicator.BaseProgressIndicatorSpec


This class contains the parameters shared between linear type and circular type. The parameters reflect the attributes defined in R.styleable.BaseProgressIndicator.

Summary

Fields

public int hideAnimationBehavior

The animation behavior to hide the indicator and track.

public int[] indicatorColors

The color array used in the indicator.

public int showAnimationBehavior

The animation behavior to show the indicator and track.

public int trackColor

The color used in the track.

public int trackCornerRadius

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

public int trackThickness

The thickness of the track and indicator.

Protected constructors

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

Public methods

boolean isHideAnimationEnabled()
boolean isShowAnimationEnabled()

Inherited methods

Fields

hideAnimationBehavior

public int hideAnimationBehavior

The animation behavior to hide the indicator and track.

indicatorColors

public int[] indicatorColors

The color array used in the indicator. In determinate mode, only the first item will be used.

showAnimationBehavior

public int showAnimationBehavior

The animation behavior to show the indicator and track.

trackColor

public int trackColor

The color used in the track. If not defined, it will be set to the indicatorColors and apply the first disable alpha value from the theme.

trackCornerRadius

public int trackCornerRadius

When this is greater than 0, the corners of both the track and the indicator will be rounded with this radius. If the radius is greater than half of the track width, an IllegalArgumentException will be thrown during initialization.

trackThickness

public int trackThickness

The thickness of the track and indicator.

Protected constructors

BaseProgressIndicatorSpec

protected BaseProgressIndicatorSpec (Context context, 
                AttributeSet attrs, 
                int defStyleAttr, 
                int defStyleRes)

Parameters
context Context

attrs AttributeSet

defStyleAttr int

defStyleRes int

Public methods

isHideAnimationEnabled

public boolean isHideAnimationEnabled ()

Returns
boolean

isShowAnimationEnabled

public boolean isShowAnimationEnabled ()

Returns
boolean