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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With