Created
October 9, 2013 11:06
-
-
Save seemike/6899579 to your computer and use it in GitHub Desktop.
android dialog attributes - modal, dim background, notitle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public Dialog onCreateDialog(Bundle savedInstanceState) { | |
Dialog dialog = super.onCreateDialog(savedInstanceState); | |
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); | |
//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); | |
//blur out the background | |
//window.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND); | |
window.getAttributes().windowAnimations = R.style.dialog_animation; | |
return dialog; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment