雖然有一些Android的代碼工作,我碰到一個疑問來了(可能是愚蠢的),但我想清除...意圖參數
我嘗試:啓動每次在一個應用程序中都可以看到啓動畫面,該應用程序也會讀取某些共享首選項,並根據該共享首選項的值打開下一個活動。
我卡住了:當我無法弄清楚,以什麼作爲參數傳遞給意圖(見代碼的唯一評論)類型的activityToOpen
if(appStatus==0)
{
activityToOpen="LoginActivity";
}
else if(appStatus==1)
{
activityToOpen="SecondActivity";
}
int secondsDelayed = 1;
new Handler().postDelayed(new Runnable() {
public void run() {
Intent i=new Intent(MainSplashScreen.this,);//here how should be the second argument will be added
startActivity(i);
finish();
}
}, secondsDelayed * 1000);
是String
。我不知道它是什麼類型的變量,.class
新的意圖(MainSplashScreen.this,LoginActivity.class) ; 1參數從where 2到where – UMESH0492 2014-09-02 06:10:14