gpt4 book ai didi

androidManifest Activity android :excludeFromRecents

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:51:10 25 4
gpt4 key购买 nike

我正在使用以下代码将 Activity 作为弹出窗口打开

<activity android:name=".RadioButtonExample" 
android:theme="@android:style/Theme.Dialog"
android:excludeFromRecents="true"/>

但是 excludeFromRecents 不起作用。如果用户点击后退按钮,弹出窗口会在返回主菜单时显示。

最佳答案

使用android:noHistory="true"

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.

关于androidManifest Activity android :excludeFromRecents,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8037869/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com