List of utility methods to do AlertDialog Create
AlertDialog | createOpenSourceDialog( final Context context) create Open Source Dialog final WebView webView = new WebView(context); webView.loadUrl("file:///android_asset/licenses.html"); return new AlertDialog.Builder(context) .setTitle(R.string.settings_open_source_licenses) .setView(webView) .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { @Override ... |
void | showAlert(Activity activity, String message) show Alert showAlert(activity, "", message);
|
void | showAlert(Activity activity, String title, String message) show Alert AlertDialog.Builder ad = new AlertDialog.Builder(activity); ad.setTitle(title); ad.setMessage(message); ad.setNegativeButton("OK", null); ad.setCancelable(true); ad.show(); |
void | showAlert(Activity activity, int messageStringId) show Alert Resources res = activity.getResources();
showAlert(activity, "", res.getString(messageStringId));
|
void | showAlert(Activity activity, int titleStringId, int messageStringId) show Alert Resources res = activity.getResources(); showAlert(activity, res.getString(titleStringId), res.getString(messageStringId)); |
void | showAlert(Context context, int titleId, String message) Show Alert Dialog Dialog dlg = new AlertDialog.Builder(context)
.setIcon(android.R.drawable.ic_dialog_alert)
.setTitle(titleId)
.setPositiveButton(android.R.string.ok, null)
.setMessage(message).create();
dlg.show();
|
void | showAlert(Context context, int titleId, String message, CharSequence positiveButtontxt, DialogInterface.OnClickListener positiveListener) Show Alert Dialog Dialog dlg = new AlertDialog.Builder(context)
.setIcon(android.R.drawable.ic_dialog_alert)
.setTitle(titleId)
.setPositiveButton(positiveButtontxt, positiveListener)
.setMessage(message).setCancelable(false).create();
dlg.show();
|
void | showAlert(Context context, int titleId, int messageId) Show Alert Dialog Dialog dlg = new AlertDialog.Builder(context)
.setIcon(android.R.drawable.ic_dialog_alert)
.setTitle(titleId)
.setPositiveButton(android.R.string.ok, null)
.setMessage(messageId).create();
dlg.show();
|
void | showAlert(Context context, int titleId, int messageId, CharSequence positiveButtontxt, DialogInterface.OnClickListener positiveListener, CharSequence negativeButtontxt, DialogInterface.OnClickListener negativeListener) Show Alert Dialog Dialog dlg = new AlertDialog.Builder(context)
.setTitle(titleId)
.setPositiveButton(positiveButtontxt, positiveListener)
.setNegativeButton(negativeButtontxt, negativeListener)
.setMessage(messageId).setCancelable(false).create();
dlg.show();
|
void | showAlert(Context parent, String alert) show Alert new AlertDialog.Builder(parent).setTitle("Error").setMessage(alert) .setNeutralButton("Close", null).show(); |