I'm working on an Android App. I have the need to customize Alert Dialog buttons because it shows me the buttons in an unspecified way.
The code to invoke the alert dialogue is:
new AlertDialog.Builder(context,R.style.dialog_theme)
.setTitle(R.string.dialog_title_avviso)
.setMessage(messageResId)
.setPositiveButton(R.string.dialog_button_si, (dialog, which) -> listener.onResponse(dialog, DialogResponse.OK))
.setNegativeButton(R.string.dialog_button_no, (dialog, which) -> listener.onResponse(dialog, DialogResponse.CANCEL))
.show();
In the style.xml
I define the following style:
<style name="dialog_theme" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="android:windowTitleStyle">@style/AlertDialogTitleStyle</item>
</style>
I would like to set the dialogue in the following mode:
Any ideas? Thanks