public static int Msgbox2(String Message, String Title, String Positive, String Cancel, String Negative, Bitmap Icon, BA ba) {
AlertDialog.Builder b = new AlertDialog.Builder(ba.context);
anywheresoftware.b4a.Msgbox.DialogResponse dr = new DialogResponse(false);
b.setTitle(Title).setMessage(Message);
if (Positive.length() > 0)
b.setPositiveButton(Positive, dr);
if (Negative.length() > 0)
b.setNegativeButton(Negative, dr);
if (Cancel.length() > 0)
b.setNeutralButton(Cancel, dr);
if (Icon != null) {
BitmapDrawable bd = new BitmapDrawable();
bd.Initialize(Icon);
b.setIcon(bd.getObject());
}
AlertDialog ad = b.create();
anywheresoftware.b4a.Msgbox.msgbox(ad, false);
return dr.res;
}