Android Utililty Methods AlertDialog Create

List of utility methods to do AlertDialog Create

Description

The list of methods to do AlertDialog Create are organized into topic(s).

Method

voidshowInfoDialog(String text, final Context context)
show Info Dialog
String ok_text = "Ok";
AlertDialog infoDialog = new AlertDialog.Builder(context)
        .setIcon(android.R.drawable.ic_dialog_info)
        .setItems(null, new OnClickListener() {
            public void onClick(DialogInterface dialog, int which) {
        }).setTitle("Info").setMessage(text)
        .setPositiveButton(ok_text, new OnClickListener() {
...
DialogmakeSimpleDialog(Activity activity, String text)
Create a simple Dialog with an 'OK' button and a message.
return (new AlertDialog.Builder(activity)).setMessage(text)
        .setNeutralButton(android.R.string.ok, null).create();
DialogmakeSimpleDialog(Activity activity, String title, String text)
Create a simple Dialog with an 'OK' button, a title, and a message.
return (new AlertDialog.Builder(activity)).setTitle(title)
        .setMessage(text)
        .setNeutralButton(android.R.string.ok, null).create();
AlertDialogshowDownloadDialog(final Activity activity, CharSequence stringTitle, CharSequence stringMessage, CharSequence stringButtonYes, CharSequence stringButtonNo, final String uriString)
show Download Dialog
AlertDialog.Builder downloadDialog = new AlertDialog.Builder(
        activity);
downloadDialog.setTitle(stringTitle);
downloadDialog.setMessage(stringMessage);
downloadDialog.setPositiveButton(stringButtonYes,
        new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialogInterface,
                    int i) {
...