The backgrounds of all the pictures are changing at the same time. I have to change one by one, wait 5 seconds after each picture, change the other,
ImageView[] imajlar={img1,img2,img3,img4,img5,img6,img7,img8};
for (final ImageView resmi:imajlar) {
//resmi.startAnimation(fadeout);
new CountDownTimer(16000, 1000) {
@Override
public void onTick(long millisUntilFinished) {
resmi.setBackground(hediye);
resmi.startAnimation(fadein);
onPause();
}
@Override
public void onFinish() {
}
}.start();
Try Timer with Handler
Do it like
Define an array of images.
and a variable
now in your method
Then in you defined handler.
Try this code..
Use
Handler
for this. I hope this helps you.