當我打開AlertDialog
時,如何顯示圖像?在AlertDialog中顯示圖片?
或者還有其他方式可以顯示圖像,但ImageView
?
我得到這個代碼,但它只是顯示的文字和我似乎無法找到方法來顯示圖像:
private void AlertDialogz() {
// TODO Auto-generated method stub
AlertDialog.Builder alert = new AlertDialog.Builder(context);
alert.setTitle("Note");
alert.setMessage(context.getString(R.string.lyrics));
alert.setCancelable(false);
alert.setPositiveButton("Zatvori", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int whichButton) {
dialog.dismiss();
}
});
}
http://stackoverflow.com/a/18504788/1066839 – John
http://stackoverflow.com/questions/6276501/how-to-put-an- image-in-an-alertdialog-android –