I’m trying to expand the default Android project a bit by adding another activity. The idea is that I start this activity when the user presses a ‘help’ option in-game, and it will show them a
WebView containing some HTML help files. I don’t think it’s important, but I’m doing this by letting the Android
MainActivity subscribe to a
HelpRequested event which is fired by my
Game class when the user chooses the option, and in the handler for this event I’m starting the help activity with an
This all seems to work fine, but it glitches out if I navigate out of my app with the Help Activity open (by pressing the home button, for example) and then return. The ‘back’ button on my device (and also the back arrow on the toolbar at the top of the activity) now cause the app to lose focus again, and I’m returned to my device’s main menu. When I re-select the app and bring it back into focus, I’m stuck in a loop where the app will go to the background if I press the back button.
Can anyone suggest what’s up, or perhaps share a bit of sample code showing how I should handle my overlaid help activity?