天天看點

解決Android程式退出後不顯示在近期任務裡

solution:

在androidmanifest.xml中對應的activity中找到“android:excludefromrecents”,把值改為false,或直接去掉該項。

develop reference

<code>android:excludefromrecents</code>

whether or not the task initiated by this activity should be excluded from the list of recently used applications ("recent apps"). that is, when this activity is the root activity of a new task, this attribute determines whether the task should not appear in

the list of recent apps. "<code>true</code>" if the task should beexcluded from the list; "<code>false</code>" if it should be included. the default value is "<code>false</code>".

============================

相反,如果要不出現在近期任務裡面,可以增加android:excludefromrecents="true",但貌似要apk中所有activity都加上才有用。

繼續閱讀