androidManifest活动机器人:excludeFromRecents机器人、androidManifest、excludeFromRecents

2023-09-12 04:43:37 作者:老娘傲不解释

我使用下面的code。使用,以打开活动为弹出窗口 <活动机器人:名称=。RadioButtonExample             机器人:主题=@安卓风格/ Theme.Dialog             机器人:excludeFromRecents =真/> 但excludeFromRecents不工作。如果用户单击后退按钮在弹出的窗口显示在检索返回主菜单。

I am using following code to open an activity as a popup window using <activity android:name=".RadioButtonExample" android:theme="@android:style/Theme.Dialog" android:excludeFromRecents="true"/> But excludeFromRecents is not working. If user clicks back button the popup window shows while retrieving back to main menu.

请帮助我,因为我是新来的android开发。

Please help me as I am new to android development.

推荐答案

使用安卓noHistory =真正的

是否活动应该从活动栈中删除   及成品(它的完成()方法调用),当用户离开   从它和它的不再可见在屏幕上 - 真,如果它应该是   讲完了,假,如果没有。默认值是假。的价值   真意味着活动不会留下历史痕迹。它   不会留在任务的活动堆栈,所以用户将   不能够返回到它。

Whether or not the activity should be removed from the activity stack and finished (its finish() method called) when the user navigates away from it and it's no longer visible on screen — "true" if it should be finished, and "false" if not. The default value is "false". A value of "true" means that the activity will not leave a historical trace. It will not remain in the activity stack for the task, so the user will not be able to return to it.