Android activity: Manifest android: excludeFromRecents

I use the following code to open an action as a popup using <activity android:name=".RadioButtonExample" android:theme="@android:style/Theme.Dialog" android:excludeFromRecents="true"/> But excludeFromRecents does not work . If the user presses the back button, a pop-up window is displayed when returning to the main menu.

Please help me as I am new to Android development.

+3
source share
1 answer

Use android:noHistory="true"

Whether an action should be excluded from the action stack and finished (its finish () method is called) when the user moves away from him and he is no longer visible on the screen is โ€œtrueโ€ if it should be completed and โ€œfalseโ€ if not. The default value is incorrect. "True" means that the activity will not leave a historical mark. This will not remain in the action stack for the task, so the user will not be able to return to it.

+11
source

All Articles