public class CountDownButtonHelper
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
CountDownButtonHelper.OnCountDownListener
计时时监听接口
|
| Constructor and Description |
|---|
CountDownButtonHelper(android.widget.TextView button,
int countDownTime)
构造方法
|
CountDownButtonHelper(android.widget.TextView button,
int countDownTime,
int interval)
构造方法
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
取消倒计时
|
CountDownButtonHelper |
setOnCountDownListener(CountDownButtonHelper.OnCountDownListener listener)
设置倒计时的监听器
|
void |
start()
开始倒计时
|
public CountDownButtonHelper(android.widget.TextView button,
int countDownTime)
button - 需要显示倒计时的ButtoncountDownTime - 倒计时总时间,单位是秒public CountDownButtonHelper(android.widget.TextView button,
int countDownTime,
int interval)
button - 需要显示倒计时的ButtoncountDownTime - 需要进行倒计时的最大值,单位是秒interval - 倒计时的间隔,单位是秒public void start()
public CountDownButtonHelper setOnCountDownListener(CountDownButtonHelper.OnCountDownListener listener)
listener - public void cancel()