how to start animation one after the another using thread for image view?
In my android application i need to animate the image view one after
another i have four image view animation should proceed one after another
for the image view
i have tried using thread
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
i have used two thread to start animation plz help me i am new to android
No comments:
Post a Comment