На следующем рисунке показан мой AlertDialog
, который не показывает нейтральную кнопку, которую я реализовал.
Ниже приведен код, относящийся к моей AlertDialog
:
AlertDialog.Builder ImageDialog = new AlertDialog.Builder(PlayActivity.this, R.style.DialogBoxDefault);
ImageDialog.setTitle("Congratulations!");
ImageDialog.setCancelable(false);
ImageView trophy = new ImageView(PlayActivity.this);
trophy.setMaxWidth(300);
trophy.setMaxHeight(300);
trophy.setAdjustViewBounds(true);
trophy.setImageResource(getImageResource("Reward 1"));
ImageDialog.setView(trophy);
ImageDialog.setMessage("You have successfully achieved 1 correct answer! This reward will now be displayed in your Reward Room.");
ImageDialog.setNeutralButton("Continue", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
trophySound.stop();
ButtonClick.clickSound(PlayActivity.this);
getCorrectDialogBox();
}
});
ImageDialog.show();
Есть ли способ получить Кнопка для отображения без изменения или удаления ImageView?
Любая помощь приветствуется, спасибо.