|  |  |  | 
|---|
|  |  |  | switch (ev.getAction()) { | 
|---|
|  |  |  | //获取触摸动作,如果ACTION_UP,计时开始。 | 
|---|
|  |  |  | case MotionEvent.ACTION_UP: | 
|---|
|  |  |  | downTime = 60; | 
|---|
|  |  |  | initCountTimer(); | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | //否则其他动作计时取消 | 
|---|
|  |  |  | 
|---|
|  |  |  | return super.dispatchTouchEvent(ev); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | protected long downTime = 60; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | protected void initCountTimer(){ | 
|---|
|  |  |  | if(!isAddCountTimer){ | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | MApplication.initCountTimer(isToGuild,timerCallBack); | 
|---|
|  |  |  | MApplication.initCountTimer(downTime*1000,timerCallBack); | 
|---|
|  |  |  | MApplication.startCountTimer(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | if(isFinishing()){ | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | timeChange(String.format(getString(R.string.time_djs),millisUntilFinished/1000)); | 
|---|
|  |  |  | timeChange((millisUntilFinished/1000)+"s"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }; | 
|---|
|  |  |  |  | 
|---|