I have an Android AlertDialog with some info and Neutral and Positive buttons.
I set the size of the AlertDialog with the following line, which gives it the correct height that i want:
MaterialAlertDialogBuilder alert = new MaterialAlertDialogBuilder(context);
alert.setView(wifiResultView);
// stuff
alertDialog = alert.show();
alertDialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
However, the buttons align with the end of the data in the dialog and i can't for the life of me figure out how to get them to stick to the bottom. Does anybody have any idea? I would greatly appreciate it.
I want the buttons to stick to the bottom of the window, with space between the data and the buttons (not with space below the buttons like in the picture).
I'm using Android 11 (Samsung Galaxy S10e)
Thanks a bunch!


