在我的android应用程序中,我需要一个接一个地为图像视图设置动画我有四个图像视图动画应该一个接一个地进行图像视图
我试过使用线程
iv1=(ImageView)findViewById(R.id.imageView1);
iv2=(ImageView)findViewById(R.id.imageView2);
iv3=(ImageView)findViewById(R.id.imageView3);
iv4=(ImageView)findViewById(R.id.imageView4);
iv1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
animSlideUp = AnimationUtils.loadAnimation(getApplicationContext(),
R.anim.slide_up);
mSplashThread1 = new Thread(){
@Override
public void run(){
try {
synchronized(this){
// Wait given period of time or exit on touch
wait(5000);
iv3.startAnimation(animSlideUp);
}
}
catch(InterruptedException ex){
}
finish();
}
};
// The thread to wait for splash screen events
mSplashThread = new Thread(){
@Override
public void run(){
try {
synchronized(this){
// Wait given period of time or exit on touch
wait(5000);
iv2.startAnimation(animSlideUp);
}
}
catch(InterruptedException ex){
}
finish();
mSplashThread1.start();
}
};
mSplashThread.start();
// The thread to wait for splash screen events
我已经使用两个线程来启动动画请帮助我我是 android 新手