2013-07-31 59 views

回答

1

你想要一個splash屏幕。谷歌有一些關於它的話題。

0

它實際上所謂的閃屏,它應該是這樣的:

class SplashScreen extends Activity{ 
/* in oncreate do all the function u want and after that finish this activity*/ 
public void oncreate(){ 
new BackGroundProcess.execute(arguments)// async task to load data 
intent i = new Intent(SplashScreen.this,OtherActivity.class); 
startActivity(i); 
finish(); 
} 
} 

class BackGroundProcess extends AsyncTask<arguments> 
{ 
     public onPreExecute(){ 
     // start your progress dialog here 
     } 
     public doInBackground(){ 
      //loadDataHere 
     } 
     public onPostExecute(){ 
     // stop your progress dialog here 
     } 
} 

的幫助,你可以嘗試thisthis

相關問題