progressview / com.skydoves.progressview / ProgressView

ProgressView

class ProgressView : FrameLayout

ProgressView is a progress bar with a flexible text and animations.

Types

Builder

Builder class for creating ProgressView.

class Builder

Constructors

<init>

ProgressView(context: Context)
ProgressView(context: Context, attributeSet: AttributeSet)
ProgressView(context: Context, attributeSet: AttributeSet, defStyle: Int)

Properties

autoAnimate

starts progress animation automatically when ProgressView is initialized.

var autoAnimate: Boolean

borderColor

a border color of the ProgressView's container.

var borderColor: Int

borderWidth

a border size of the ProgressView's container.

var borderWidth: Int

colorBackground

background color of the ProgressView's container.

var colorBackground: Int

duration

duration of the progress animation.

var duration: Long

highlightView

presents background color and highlighting colors of the ProgressView.

val highlightView: HighlightView

interpolator

a customized animation interpolator.

var interpolator: Interpolator?

isAnimating

returns the ProgressView's animation is ongoing or not.

var isAnimating: Boolean

labelColorInner

text color of the labelView when the label is located inside of the progressed container. when your labelText's length is shorter than the progressed container, the labelView will be located inside of the progressed container.

var labelColorInner: Int

labelColorOuter

text color of the labelView when the label is located outside of the progressed container. when your labelText's length is longer than the progressed container, the labelView will be located outside of the progressed container.

var labelColorOuter: Int

labelConstraints

determines the constraints of the label positioning.

var labelConstraints: ProgressLabelConstraints

labelGravity

the gravity of the label.

var labelGravity: Int?

labelSize

text size of the labelView.

var labelSize: Float

labelSpace

spacing for labelView between progressed container. space will be applied if the labelView is located inside or outside.

var labelSpace: Float

labelText

text of the labelView for presenting progress.

var labelText: CharSequence?

labelTypeface

typeface of the labelView.

var labelTypeface: Int

labelTypefaceObject

typeface object of the labelView.

var labelTypefaceObject: Typeface?

labelView

presents progress value on the ProgressView.

val labelView: TextView

max

maximum value of the progress.

var max: Float

min

minimum value of the progress.

var min: Float

orientation

an orientation of the ProgressView. ProgressViewOrientation.HORIZONTAL, ProgressViewOrientation.VERTICAL the default orientation is ProgressViewOrientation.HORIZONTAL.

var orientation: ProgressViewOrientation

progress

presents the progress value of the ProgressView.

var progress: Float

progressAnimation

a provided customized progress animation. ProgressViewAnimation.NORMAL, ProgressViewAnimation.BOUNCE, ProgressViewAnimation.DECELERATE, ProgressViewAnimation.ACCELERATEDECELERATE the default animation is ProgressViewAnimation.NORMAL.

var progressAnimation: ProgressViewAnimation

progressFromPrevious

starts progress animation from the previousProgress to a new progress value.

var progressFromPrevious: Boolean

radius

corner radius of the ProgressView's container.

var radius: Float

Functions

applyTextForm

applies TextForm attributes to a TextView.

fun applyTextForm(textForm: TextForm): Unit

dispatchDraw

fun dispatchDraw(canvas: Canvas): Unit

isProgressedMax

fun isProgressedMax(): Boolean

isVertical

fun isVertical(): Boolean

onFinishInflate

fun onFinishInflate(): Unit

onLayout

fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int): Unit

onSizeChanged

fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int): Unit

progressAnimate

animates ProgressView's progress bar.

fun progressAnimate(): Unit

setOnProgressChangeListener

sets a progress change listener.

fun setOnProgressChangeListener(onProgressChangeListener: OnProgressChangeListener): Unit
fun setOnProgressChangeListener(block: (Float) -> Unit): Unit

setOnProgressClickListener

sets a progress click listener.

fun setOnProgressClickListener(onProgressClickListener: OnProgressClickListener): Unit
fun setOnProgressClickListener(block: (Boolean) -> Unit): Unit