Skip to content

Instantly share code, notes, and snippets.

@seemike
Created October 2, 2013 07:40
Show Gist options
  • Save seemike/6790251 to your computer and use it in GitHub Desktop.
Save seemike/6790251 to your computer and use it in GitHub Desktop.
android non-model dialog fragment with other behind
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
Dialog dialog = super.onCreateDialog(savedInstanceState);
dialog.setTitle("Suche verfeinern");
//set the dialog to non-modal and disable dim out fragment behind
Window window = dialog.getWindow();
window.setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL,
WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL);
window.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
return dialog;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment