Created
September 4, 2017 09:50
-
-
Save fanjavaid/f5cf2b548549753c874a18ed9ac0c74a to your computer and use it in GitHub Desktop.
Set width and height in DialogFragment
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
| ... | |
| @Override | |
| public void onResume() { | |
| ViewGroup.LayoutParams params = getDialog().getWindow().getAttributes(); | |
| params.width = LayoutParams.MATCH_PARENT; | |
| params.height = LayoutParams.MATCH_PARENT; | |
| getDialog().getWindow().setAttributes((android.view.WindowManager.LayoutParams) params); | |
| super.onResume(); | |
| } | |
| ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment