Android-如何从最近的应用程序中删除活动? [英] Android - How to remove activity from recent apps?

查看:123
本文介绍了Android-如何从最近的应用程序中删除活动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Android应用程序上创建了一个自定义对话框.此对话框是具有Dialog主题的活动.现在,假设该应用程序正在显示此对话框,则用户按主页"以返回Android主页视图.稍后,用户按住按钮Home,然后从最近的应用程序中选择我的应用程序.它将再次显示该对话框. 我要在此处执行的操作是不显示对话框.我想显示调用此对话框的活动.

I created a custom dialog on my android app. This dialog is an activity with Dialog theme. Now, assume that the app is showing this dialog, User press "Home" to back to Android Home view. Later, user press and hold button Home then choose my app from recent apps. It's will show the dialog again. What I want to do here is that the dialog shouldn't show. I want to show the activity which called this dialog.

我该怎么做?

推荐答案

如何从最近的应用中删除活动?

How to remove activity from recent apps?

我认为android:excludeFromRecents="true"应该可以解决问题.在清单中使用它

I think android:excludeFromRecents="true" should do the trick. Use it in your manifest

我在这里想要做的是不显示对话框.

What I want to do here is that the dialog shouldn't show.

onPause()

这篇关于Android-如何从最近的应用程序中删除活动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆