Android Utililty Methods Dialog Create

List of utility methods to do Dialog Create

Description

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

Method

voidsetDialogPositiveButtonHolder( DialogInterface dialog, Boolean flag)
set Dialog Positive Button Holder
try {
    Field field = dialog.getClass().getSuperclass()
            .getDeclaredField("mShowing");
    field.setAccessible(true);
    field.set(dialog, flag);
} catch (Exception e) {
    e.printStackTrace();
DialogmakeSimpleDialog(Activity activity, String text)
make Simple Dialog
return (new AlertDialog.Builder(activity)).setMessage(text)
        .setNeutralButton(android.R.string.ok, null).create();
DialogmakeSimpleDialog(Activity activity, String title, String text)
make Simple Dialog
return (new AlertDialog.Builder(activity)).setMessage(text)
        .setTitle(title)
        .setNeutralButton(android.R.string.ok, null).create();
DialogmakeSimpleDialog(String text)
make Simple Dialog
if (mActivity == null) {
    logError("*** makeSimpleDialog failed: no current Activity!");
    return null;
return makeSimpleDialog(mActivity, text);
DialogmakeSimpleDialog(String title, String text)
make Simple Dialog
if (mActivity == null) {
    logError("*** makeSimpleDialog failed: no current Activity!");
    return null;
return makeSimpleDialog(mActivity, title, text);
DialogInterface.OnClickListenergetDialogFinishListener( final Activity activity)
get Dialog Finish Listener
return new DialogInterface.OnClickListener() {
    public void onClick(DialogInterface dialog, int which) {
        activity.finish();
};