[英]Removing an application from the recent app list
I want to disable my app from the recent apps list, I don't want to remove the app I just want to disable it from recent apps list.How can I do this? 我想从最近的应用程序列表中禁用我的应用程序,我不想从最近的应用程序列表中删除我只是想禁用它的应用程序,我该怎么做?
this is my code 这是我的代码
<activity
android:name=".Your_Root_Activity_Name"
android:excludeFromRecents="true"
....
</activity>
I have used above code in my manifest but it remove my app from recent app. 我在清单中使用了上面的代码,但是它从最近的应用程序中删除了我的应用程序。
Android does not have a concept of apps being disabled in the overview screen (recent apps list). Android在概观屏幕(最近的应用程序列表)中没有禁用应用程序的概念。 There is no means via the Android SDK of doing what you want. 无法通过Android SDK进行所需的操作。 android:excludeFromRecents
is the closest thing, which as you note blocks that activity from appearing in the overview screen. android:excludeFromRecents
是最接近的内容,如您所述,它阻止该活动出现在概览屏幕中。
I am not sure whether i got your question or not, but the thing which i understood is you do not want to memorize the activity in stack when going to back to previous activity.... If this is what you want then just include the property in the activity tag with in AndroidManifest. 我不确定是否收到您的问题,但是我了解的事情是,当您回到上一个活动时,您不想记住堆栈中的活动。...如果这是您想要的,则只需包含在AndroidManifest中的活动代码中添加属性。 android:noHistory="true"
<activity
android:name=".registration.MainActivity"
android:label="@string/app_name"
android:noHistory="true"
android:windowSoftInputMode="adjustPan"/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.