List of utility methods to do Dialog Create
void | setDialogPositiveButtonHolder( 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(); |
Dialog | makeSimpleDialog(Activity activity, String text) make Simple Dialog return (new AlertDialog.Builder(activity)).setMessage(text) .setNeutralButton(android.R.string.ok, null).create(); |
Dialog | makeSimpleDialog(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(); |
Dialog | makeSimpleDialog(String text) make Simple Dialog if (mActivity == null) { logError("*** makeSimpleDialog failed: no current Activity!"); return null; return makeSimpleDialog(mActivity, text); |
Dialog | makeSimpleDialog(String title, String text) make Simple Dialog if (mActivity == null) { logError("*** makeSimpleDialog failed: no current Activity!"); return null; return makeSimpleDialog(mActivity, title, text); |
DialogInterface.OnClickListener | getDialogFinishListener( final Activity activity) get Dialog Finish Listener return new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { activity.finish(); }; |