我有一個以「SplashScreen」開頭的應用程序,當它結束時它會進入「MainScreen」。從「最近的應用程序」啓動應用程序和點擊應用程序圖標主屏幕的問題
我對「MainScreen」,我點擊主頁按鈕:
CASE 1我在「概覽」點擊(按鈕,顯示最近使用的應用),我點擊我的應用程序,只需繼續它的位置,即在MainScreen上。
案例2.但是,如果我從桌面/主屏幕點擊應用程序圖標,這將啓動零應用程序,即調用SplashScreen。
我想,如果我打從桌面這個呼叫最近的活動因爲它的圖標「最近使用的應用
閃屏:
[Activity(MainLauncher = true, LaunchMode = LaunchMode.SingleInstance,ClearTaskOnLaunch = true,
AlwaysRetainTaskState = false, ExcludeFromRecents = true, NoHistory = true,
Label = "MyApp", ScreenOrientation = ScreenOrientation.Portrait, Theme = "@style/Theme.FullScreen", Icon = "@drawable/icon")]
我稱之爲‘MainScreen’是這樣的:
Intent intent = new Intent(Application.Context, typeof(MainActivity));
intent.SetFlags(ActivityFlags.ClearTask);
StartActivity(intent);
OverridePendingTransition(Resource.Animation.fade_in_animation, Resource.Animation.fade_out_animation);
this.Finish();
OverridePendingTransition(Resource.Animation.fade_in_animation, Resource.Animation.fade_out_animation);
而且MainScreen:
[Activity(MainLauncher = false, LaunchMode = LaunchMode.SingleTask,
AlwaysRetainTaskState = true, ExcludeFromRecents = false, NoHistory = false,
Label = "MyApp", ScreenOrientation = ScreenOrientation.Portrait, Icon = "@drawable/icon", Theme = "@style/Theme.FullScreen")]