CircularProgressIndicator

This class implements the circular type progress indicators.

With the default style Widget.MaterialComponents.CircularProgressIndicator, 4dp indicator/track thickness is used without animation for visibility change. Without customization, primaryColor will be used as the indicator color; the track is transparent. The following attributes can be used to customize the component's appearance:

  • trackThickness: the thickness of the indicator and track.
  • indicatorColor: the color(s) of the indicator.
  • trackColor: the color of the track.
  • trackCornerRadius: the radius of the rounded corner of the indicator and track.
  • indicatorSize: the outer diameter of the spinner.
  • indicatorInset: the inset from component's bound to the spinner's outer edge.
  • indicatorDirectionCircular: the rotation direction of the spinner or indicator.

For more information, see the component developer guidance and design guidelines.

Constructors

Link copied to clipboard
constructor(@NonNull context: Context)
constructor(@NonNull context: Context, @Nullable attrs: AttributeSet)
constructor(@NonNull context: Context, @Nullable attrs: AttributeSet, @AttrRes defStyleAttr: Int)

Types

Link copied to clipboard

Properties

Functions

Link copied to clipboard
Returns the indicator animating direction used in this progress indicator.
Link copied to clipboard
Returns the inset of this progress indicator.
Link copied to clipboard
open fun getIndicatorSize(): Int
Returns the size (outer diameter) of this progress indicator.
Link copied to clipboard
open fun setIndicatorDirection(indicatorDirection: Int)
Sets the indicator animating direction used in this progress indicator.
Link copied to clipboard
open fun setIndicatorInset(@Px indicatorInset: Int)
Sets the inset of this progress indicator.
Link copied to clipboard
open fun setIndicatorSize(@Px indicatorSize: Int)
Sets the size (outer diameter) of this circular progress indicator.
Link copied to clipboard
open fun setTrackThickness(trackThickness: Int)
Sets the track thickness of this progress indicator.