My activity A is a game and it does some background operations. When I press a button in the contextual menu, I want to pop up a "small window/dialog/subactivity" (lets call it B) that appears on top of activity A and displays some data about those background operations. But I need to keep the focus on the activity A in order to continue interacting with it (playing the game).
In essence, I want to be able to see the data display by B while playing the game.
I'm not really sure how to implement this. After reading the documentation I have the next conclusions:
Any suggestions? Solutions?
PS: I found some this thread here that are very related to my question:
Create an Activity with style Theme.Dialog
. This is a normal activity which looks like a dialog, while being modeless and accepting events.
Additional catch is in setting WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
and resetting WindowManager.LayoutParams.FLAG_DIM_BEHIND
.
See this answer for complete example: timed modeless dialog