0
这是我在countdowntimer中使用的代码。动画中的CountDownTimer
mDetector = new GestureDetector(this, new MyGestureDetector());
ImageView iv = (ImageView)findViewById(R.id.imageView1);
iv.setOnTouchListener(new OnTouchListener(){
@Override
public boolean onTouch(View arg0, MotionEvent arg1) {
mDetector.onTouchEvent(arg1);
final ImageView iv = (ImageView) findViewById(R.id.imageView1);
iv.setVisibility(View.GONE);
new CountDownTimer(3000, 1000) {
public void onTick(long millisUntilFinished) {
AnimationDrawable loadingAnimaton;
loadingAnimation = (AnimationDrawable) ImageView.getBackground();
}loadingAnimation.start();
}.start();
return true;
}});
}
}
--the错误我在loadingAnimation.start();
获取说,令牌 语法错误“开始”,标识预计将设置我的倒计时数到的图像,此令牌
任何替代方法之后。