I can set the button, the icon of the alert dialog.But I don't know how to change the size of the alert dialog.
Asked
Active
Viewed 268 times
1 Answers
0
try this, just add setlayout() method after show()
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setView(layout);
builder.setTitle("Title");
alertDialog = builder.create();
alertDialog.show();
alertDialog.getWindow().setLayout(600, 400); //change width and height.

suraj shinde
- 230
- 1
- 7
- 19
-
It likes the custom alert dialog.Your method is feasible,but need me to data loading and persistence.I prefer to change the system layout directly. – RealMo May 05 '17 at 14:45