Display an alert box

1 vote · 0 comments

Simple function to display an alert box with custom title and message

raw ·
copy
· download
protected void alertbox(String title, String mymessage) { new AlertDialog.Builder(this) .setMessage(mymessage) .setTitle(title) .setCancelable(true) .setNeutralButton(android.R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton){} }) .show(); }

Be the first to comment

Sign in with OpenID