我想在當前活動執行時調用splashScreen活動。一旦當前活動完成其負載,完成splashScreen活動。我怎樣才能調用一個活動並繼續執行當前活動?謝謝。android啓動活動並繼續運行前
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = new Intent(TabBarActivity.this, splashScreen.class);
startActivity(intent);
setContentView(R.layout.main);
cicle();
}
實際上,你甚至不需要在後臺運行任務,但也許它更安全,因爲系統可能認爲你的應用程序被掛起。請告訴我,如果它。 – tiktak 2012-07-17 13:52:08
在AsyncTask中運行初始化是個好主意,否則ANR會顯示出來。但重要的是AsyncTask-s不能同時運行 – marcinj 2012-07-17 14:01:32