ProgressSpinner

public class ProgressSpinner
extends ProgressBar

java.lang.Object
   ↳ android.view.View
     ↳ android.widget.ProgressBar
       ↳ android.support.wearable.view.ProgressSpinner


一个不确定的进度微调器设计用于循环穿过颜色的可穿戴设备。 有四种有效的颜色设置方法。

Summary

Inherited constants

From class android.view.View

Inherited fields

From class android.view.View

Public constructors

ProgressSpinner(Context context)
ProgressSpinner(Context context, AttributeSet attrs)
ProgressSpinner(Context context, AttributeSet attrs, int defStyle)

Public methods

void hide()

停止动画并隐藏视图。

void hideWithAnimation(AnimatorListenerAdapter listener)

用动画隐藏微调器。

void hideWithAnimation()

用动画隐藏微调器。

void setColors(int[] colors)

设置要在微调器中使用的颜色。

void showWithAnimation()

用动画显示微调器。

void showWithAnimation(long delayMs)

用动画显示微调器。

void showWithAnimation(long delayMs, AnimatorListenerAdapter listener)

用动画和延迟显示微调器。

Inherited methods

From class android.widget.ProgressBar
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource

Public constructors

ProgressSpinner

ProgressSpinner (Context context)

Parameters
context Context

ProgressSpinner

ProgressSpinner (Context context,
                AttributeSet attrs)

Parameters
context Context
attrs AttributeSet

ProgressSpinner

ProgressSpinner (Context context,
                AttributeSet attrs,
                int defStyle)

Parameters
context Context
attrs AttributeSet
defStyle int

Public methods

hide

void hide ()

停止动画并隐藏视图。

hideWithAnimation

void hideWithAnimation (AnimatorListenerAdapter listener)

用动画隐藏微调器。

无论隐藏动画是否会真正运行,总是会取消此微调器实例的所有其他动画。

如果隐藏动画由于微调器的现有可见状态而不能运行,那么侦听器的onAnimationEnd()方法将立即用空Animation调用。

Parameters
listener AnimatorListenerAdapter: listener to receive animation callbacks while hiding spinner

hideWithAnimation

void hideWithAnimation ()

用动画隐藏微调器。

无论隐藏动画是否会真正运行,总是会取消此微调器实例的所有其他动画。

setColors

void setColors (int[] colors)

设置要在微调器中使用的颜色。 他们将被反复显示并按顺序显示。

Parameters
colors int: Array of one or more integers representing colors in ARGB format.

showWithAnimation

void showWithAnimation ()

用动画显示微调器。 这相当于以延迟0调用showWithAnimation(long)

showWithAnimation

void showWithAnimation (long delayMs)

用动画显示微调器。

将始终取消此Spinner实例的所有其他动画。

Parameters
delayMs long: delay before starting the animation in milliseconds

showWithAnimation

void showWithAnimation (long delayMs,
                AnimatorListenerAdapter listener)

用动画和延迟显示微调器。

将始终取消此Spinner实例的所有其他动画。

Parameters
delayMs long: delay before starting the animation in milliseconds
listener AnimatorListenerAdapter: listener to receive animation callbacks while showing spinner