Last active
December 10, 2015 17:18
-
-
Save tsmsogn/4467018 to your computer and use it in GitHub Desktop.
[android]Full screen dialog
This file contains hidden or 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
| // 'dialog' is Dialog object | |
| dialog.getWindow().setLayout(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT); | |
| dialog.show(); |
This file contains hidden or 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
| // 'dialog' is Dialog object | |
| dialog.show(); | |
| Window window = dialog.getWindow(); | |
| WindowManager.LayoutParams currentDialogAttributes = window.getAttributes(); | |
| WindowManager.LayoutParams newDialogAttributes = new WindowManager.LayoutParams(); | |
| newDialogAttributes.copyFrom(currentDialogAttributes); | |
| newDialogAttributes.width = WindowManager.LayoutParams.FILL_PARENT; | |
| newDialogAttributes.height = WindowManager.LayoutParams.FILL_PARENT; | |
| window.setAttributes(newDialogAttributes); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment