These days I\'m working on simulating modal dialog in Android. I\'ve googled a lot, there\'s much discussions but sadly there\'s not much options to get it modal. Here\'s so
This works for me: create an Activity as your dialog. Then,
Add this to your manifest for the activity:
android:theme="@android:style/Theme.Dialog"
Add this to onCreate of your activity
setFinishOnTouchOutside (false);
Override onBackPressed in your activity:
@Override public void onBackPressed() { // prevent "back" from leaving this activity }
The first gives the activity the dialog look. The latter two make it behave like a modal dialog.