I have an activity that is using the Theme.Dialog style such that it is a floating window over another activity. However, when I click outside the dialog window (on the background activity), the dialog closes. How can I stop this behaviour?
This could assist you. It is a way to manage the touch outside event:
How to cancel a Dialog themed like Activity when touched outside the window?
By grabbing the event and doing nothing, I think you can prevent the closing. But what is strange though, is that particular default behavior of your project dialog should be not to close itself when you touch outside.
(PS: the code practices WindowManager.LayoutParams)