even if I don't set the .setIcon(android.R.drawable.ic_dialog_alert) icon .setIcon(android.R.drawable.ic_dialog_alert) for the dialog box, it shows the info icon.
How to completely remove an icon from a dialog box?
new AlertDialog.Builder(MyActivity.this) .setTitle(R.string.success_title) .setMessage(R.string.success_msg) .setNeutralButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dlg, int sumthin) { try { dlg.dismiss(); } catch (Exception e) { } } }).show();
Edited: Sorry, all .. I completely remove the .setIcon line from the dialog box. I forgot to remove it when I paste the code here. Even I delete that I still see the icon as an information icon.
source share