Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

androidManifest activity android: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.

like image 966
vishnu Avatar asked Dec 16 '22 07:12

vishnu


1 Answers

Use 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.

like image 117
aromero Avatar answered Jan 12 '23 15:01

aromero