How can I implement the horizontal dividers or the elevation which can be seen on the Title and Buttons in the dialog box in the following image?
I have installed the material components library and used the dialog documentation as a guide.
The code is as follows:
MaterialAlertDialogBuilder materialAlertDialogBuilder = new MaterialAlertDialogBuilder(this.getActivity());
LayoutInflater inflater = ((Activity) context).getLayoutInflater();
View view = inflater.inflate(R.layout.dialog_settings, null);
setupView(view);
materialAlertDialogBuilder.setView(view);
materialAlertDialogBuilder.setTitle("Settings");
materialAlertDialogBuilder.setPositiveButton("OK", new DialogInterface.OnClickListener()
{
@Override
public void onClick(DialogInterface dialog, int which)
{
}
});
materialAlertDialogBuilder.setNegativeButton("CANCEL", new DialogInterface.OnClickListener()
{
@Override
public void onClick(DialogInterface dialog, int which)
{
}
});
materialAlertDialogBuilder.setCancelable(false);
materialAlertDialogBuilder.create();
materialAlertDialogBuilder.show();
The MaterialAlertDialogBuilder does not seem to have the ability to set this property.


