Reputation: 7094
In my program I create a dialog with the code below. Ideally I would like to scale the dialog by entering width and height parameter programmatically. Can anyone show me how to do this?
dialog = new Dialog(MainActivity.this);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
popUpLayout = Globals.layoutInflater.inflate(R.layout.pop_up_layout, null);
dialog.setContentView(popUpLayout);
dialog.show();
Upvotes: 15
Views: 24489
Reputation: 7094
Here is the code that ended up working:
dialog.getWindow().setLayout(275, 350);
Upvotes: 40