I have a task to change the AlertDialog width and height by xml,I want make that become style,so I can use it easy.And that ,I need to change button of AlertDialog style als
Try this, this works for me,
AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setView(layout); builder.setTitle("Title"); alertDialog = builder.create(); alertDialog.getWindow().setLayout(600, 400); //Controlling width and height. alertDialog.show();