CircularProgressDrawable

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

To use one of the pre-defined sizes instead of using your own, setStyle should be called with one of the DEFAULT or 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 or setStyle methods, CircularProgressDrawable will fill the bounds set via setBounds.

Constructors

Link copied to clipboard
constructor(@NonNull context: Context)

Types

Properties

Link copied to clipboard
val DEFAULT: Int = 1
Maps to ProgressBar default style.
Link copied to clipboard
val LARGE: Int = 0
Maps to ProgressBar.Large style.

Functions

Link copied to clipboard
open fun draw(@NonNull canvas: Canvas)
Link copied to clipboard
open fun getAlpha(): Int
Link copied to clipboard
Returns the center radius for the progress spinner in pixels.
Link copied to clipboard
Returns the colors used in the progress animation
Link copied to clipboard
open fun getOpacity(): Int
Link copied to clipboard
Returns the amount of rotation applied to the progress spinner.
Link copied to clipboard
open fun isRunning(): Boolean
Link copied to clipboard
open fun setAlpha(alpha: Int)
Link copied to clipboard
open fun setCenterRadius(centerRadius: Float)
Sets the center radius for the progress spinner in pixels.
Link copied to clipboard
open fun setColorFilter(colorFilter: ColorFilter)
Link copied to clipboard
open fun setColorSchemeColors(@NonNull colors: Array<Int>)
Sets the colors used in the progress animation from a color list.
Link copied to clipboard
open fun setProgressRotation(rotation: Float)
Sets the amount of rotation to apply to the progress spinner.
Link copied to clipboard
open fun setScale(scale: Float)
Sets the scale of the spinner.
Link copied to clipboard
open fun setStyle(size: Int)
Sets the overall size for the progress spinner.
Link copied to clipboard
open fun start()
Starts the animation for the spinner.
Link copied to clipboard
open fun stop()
Stops the animation for the spinner.