标签:android style blog java 2014 art ar div
自己定义CountDownTimer
/** * 计时器 * @author Administrator * */ class TimeCount extends CountDownTimer{ public TimeCount(long millisInFuture, long countDownInterval) { super(millisInFuture, countDownInterval); } @Override public void onFinish() { } @Override public void onTick(long millisUntilFinished) { //计时显示 if(millisUntilFinished/1000-1==0){ //倒计时技术在handler中进行处理 } tv_time.setText((millisUntilFinished/1000-1)+"s");//倒计时的时间显示 } }
调用
private TimeCount time;//计时器 time=new TimeCount(60000,1000);//開始计时 time.start();
android 计时器,倒计时,布布扣,bubuko.com
标签:android style blog java 2014 art ar div
原文地址:http://www.cnblogs.com/hrhguanli/p/3887328.html