解决方案 »

  1.   

    public void goToWelcomeView(){
    setContentView(R.layout.activity_main);
    if (wv == null) {
    wv = new WelcomeView(this);
    }
    setContentView(wv);
    curr = WhichView.WELCOME_VIEW;
    }
    怎么有两个?
      

  2.   

    public void goToWelcomeView(){
    setContentView(R.layout.activity_main);這個是剛開始的進入的歡迎頁面,我需要使用延遲進入下一個主頁面
    if (wv == null) {
    wv = new WelcomeView(this);
    }
    setContentView(wv);
    //這個就是進入主頁面的方法,WelcomeView 這個類繼承了extends SurfaceView implements      SurfaceHolder.Callback,但是我不知道該怎麼用[color=#FFCC00][/color]
    curr = WhichView.WELCOME_VIEW;
    }
      

  3.   

    public void goToWelcomeView(){
    setContentView(R.layout.activity_main);
    /*
    if (wv == null) {
    wv = new WelcomeView(this);
    }*/
    new Thread(){
    public void run(){
    try {
    sleep(3500);
    } catch (InterruptedException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }
    hd.sendEmptyMessage(1);
    }
    }.start();
    curr = WhichView.WELCOME_VIEW;
    }
    // 返回到主菜單界面方法
    public void goToMainMenu(){
    setContentView(R.layout.mainmenu);
        curr = WhichView.MAIN_MENU;
    }
      

  4.   

    new Handler().postDelayed(new Runnable() {
    @Override
    public void run() {
    Intent intent = new Intent(Viewdoor.this, LoginActivity.class);
    startActivity(intent);
    Viewdoor.this.finish();
    }
    }, 1500);
    }