Попробуйте это
new AlertDialog.Builder(this, R.style.MyAlertDialogTheme)
.setIcon(R.drawable.booksmall)
.setTitle(R.string.END_OF_DUEL)
.setMessage(R.string.END_OF_DUEL2)
.setNegativeButton(android.R.string.no, null)
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
MainActivity.super.onBackPressed();
quit();
}
}).create().show();
Style
<style name="MyAlertDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="colorAccent">@color/colorTag</item>
<item name="android:colorBackground">@color/colorPrimary</item>
</style>