![](/img/trans.png)
[英]Application not open main activity when it was killed after pressing home button in android
[英]Application not open main activity when it is killed after pressing home button in android
在我的應用程序活動A中調用活動B。在活動BI中按主頁按鈕。 一段時間后,申請被終止。 但是,當我再次打開我的應用程序時,即使應用程序之前被殺死,它也會打開B而不是活動A。
通常,當您按下主屏幕按鈕時,當前活動不會被os殺死。 為了解決您的問題,將其放置在這里
android:noHistory="true"
在您的Activity B標簽的清單文件中。 您的活動將不會被記住,當您下次運行應用程序時,它將帶您進入活動A
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.