I'm trying to display an activity with a button that covers a portion of the screen similar to a dialog.
This was almost working as I wanted it by using @android:style/android:Theme.Holo.Panel
. It wasn't quite what I wanted however as I want the background to be dimmed with the activity is displayed. So I switched to this style instead: @android:style/android:Theme.Holo.Dialog.NoActionBar.
Now this looks like I want it and the background is dimmed. BUT the problem with this is if the user touches anywhere on the screen apart from the dialog then the activity gets dismissed. This does't happen with the Panel theme, the user can only dismiss it by pressing on the button.
How can I prevent the activity from being dismissed on any touch event with the Theme.Holo.Dialog?
Have you tried this.setFinishOnTouchOutside(false);
?
This
being your activity.