Take the 2-minute tour ×

I am working on Android and implementing a screen like ads. I would like to display imageviews , videoview and webview one after another inside the frame layout with specified time period for each view. Means My Activity screen has to show First imageview then videoview and then imageview and then webview and then imageview .

please help me out in this area to implement, thanks in advance.

share|improve this question

1 Answer 1

maybe you can use public final boolean postDelayed (Runnable r, long delayMillis) method which defined in Handler class


private int mCurrentShown = 0;

Runnable runnable = new Runnable() {

    public void run() {
        if (mCurrentShown == 0) {
        } else if (mCurrentShown == 1) {
        } else {


        if (mCurrentShow == 3) {
            mCurrentShow = 0;

        mHandler.postDelayed(this, 5000);

and add below line into your onCreate() method or somewhere

mHandler.postDelayed(runnable, 5000);
share|improve this answer
Thank you very much . –  Ganesh Mar 2 '12 at 5:13

Your Answer


