如何控制Intent窗口的显示顺序?

时间:2015-02-17 02:01:00

标签: android

我希望我的应用程序首先显示intent0窗口,然后在intent0窗口中单击OK或Cancel后,将显示intent1。

但事实上,intent1首先显示,然后显示intent0。

我该怎么办?谢谢!

    if (MonitorWiFi_Helper.IsEnableAdmin(getApplicationContext())==false){
        ComponentName compName = new ComponentName(getApplicationContext(), MyAdmin.class);                 
    Intent intent0 = new Intent(    DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN);
    intent0.putExtra(DevicePolicyManager.EXTRA_DEVICE_ADMIN, compName);
    intent0.putExtra(DevicePolicyManager.EXTRA_ADD_EXPLANATION, "Additional text explaining why this needs to be added.");
    startActivityForResult(intent0, RESULT_ENABLE); 
    }


   if (PublicParFun.IsFirstRun(getApplicationContext())){
      Intent intent1 = new Intent().setClass(getApplicationContext(),ui.UnlockAddWiFi.class);
      startActivityForResult(intent1, RESULT_ADDWIFI);          
   }

0 个答案:

没有答案