CircularProgressLayout
open class CircularProgressLayout : FrameLayout
kotlin.Any | ||||
↳ | android.view.View | |||
↳ | android.view.ViewGroup | |||
↳ | android.widget.FrameLayout | |||
↳ | androidx.wear.widget.CircularProgressLayout |
CircularProgressLayout
adds a circular countdown timer behind the view it contains, typically used to automatically confirm an operation after a short delay has elapsed.
The developer can specify a countdown interval via setTotalTime(long)
and a listener via setOnTimerFinishedListener(OnTimerFinishedListener)
to be called when the time has elapsed after startTimer()
has been called. Tap action can be received via
and can be used to cancel the timer via
method.
Alternatively, this layout can be used to show indeterminate progress by calling
method.
Summary
Nested classes | |
---|---|
abstract |
Public constructors | |
---|---|
<init>(context: Context!, attrs: AttributeSet!) |
|
<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int) |
|
<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int, defStyleRes: Int) |
Public methods | |
---|---|
open Int |
Returns the background color of the |
open IntArray! |
Returns the color scheme colors of the progress drawable |
open CircularProgressLayout.OnTimerFinishedListener? |
Returns the |
open CircularProgressDrawable |
Returns the |
open Float |
Returns the starting rotation of the progress drawable. |
open Float |
Returns the stroke width of the progress drawable in pixels. |
open Long |
Returns the total time in milliseconds for the timer to countdown to. |
open Boolean |
Returns if progress is showing as an indeterminate spinner. |
open Boolean |
Returns if the timer is running. |
open Unit |
setBackgroundColor(@ColorInt color: Int) Sets the background color of the |
open Unit |
setColorSchemeColors(vararg colors: Int) Sets the color scheme colors of the progress drawable, which is equivalent to calling |
open Unit |
setIndeterminate(indeterminate: Boolean) Sets if progress should be shown as an indeterminate spinner. |
open Unit |
setOnTimerFinishedListener(@Nullable listener: CircularProgressLayout.OnTimerFinishedListener?) Sets the |
open Unit |
setStartingRotation(rotation: Float) Sets the starting rotation for the progress drawable to start from. |
open Unit |
setStrokeWidth(strokeWidth: Float) Sets the stroke width of the progress drawable in pixels. |
open Unit |
setTotalTime(totalTime: Long) Sets the total time in milliseconds for the timer to countdown to. |
open Unit |
Starts the timer countdown. |
open Unit |
Stops the timer countdown. |
Protected methods | |
---|---|
open Unit | |
open Unit |