Skip to content

Instantly share code, notes, and snippets.

@seemike
Created October 29, 2013 12:32
Show Gist options
  • Save seemike/7213794 to your computer and use it in GitHub Desktop.
Save seemike/7213794 to your computer and use it in GitHub Desktop.
android: set size of the dialog window
@Override
public void onStart() {
super.onStart();
Log.d(LOG_TAG, "onStart");
if(null == getDialog()) return;
int dialogWidth = 300;
int dialogHeight = 400;
getDialog().getWindow().setLayout(dialogWidth, dialogHeight);
}
@seemike
Copy link
Author

seemike commented Oct 29, 2013

the size parameters of the layout file are ignored.

see http://adilatwork.blogspot.de/2012/11/android-dialogfragment-dialog-sizing.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment