Called when the dialog is starting. Configures the dialog window size based on device screen dimensions.