You need to keep track of the waiting process in another thread and then update the UI.
ImageButton _YourBanner = (ImageButton)finndViewById(R.id.yourBanner);
final Handler myHandler = new Handler(){
@Override
public void handleMessage(Message msg) {
//put some condition like:
int counter = msg.getData().getInt("Counter");
switch(counter){
case 0:
_YourBanner.setImageResource(R.drawable.yourFirstImage);
break;
case 1:
...
}
}};
(new Thread(new Runnable() {
@Override
public void run() {
int counter = 0;
while (counter <6){
Thread.sleep(1000);
Message msg = myHandler.obtainMessage();
Bundle bundle = new Bundle();
bundle.putInt("Counter", counter);
msg.setData(bundle);
counter++;
if (counter == 6)
counter = 0;
myHandler.sendMessage(msg);
}
}})).start();