public class DialogUtils
extends java.lang.Object
| Constructor and Description |
|---|
DialogUtils() |
| Modifier and Type | Method and Description |
|---|---|
static android.app.AlertDialog |
createAlertDialog(android.content.Context context,
int resId,
java.lang.String title,
java.lang.String message,
boolean cancelable,
boolean showDialog,
java.lang.String[] buttonTexts,
android.content.DialogInterface.OnClickListener listener)
Create
AlertDialog with the params filled. |
static android.app.ProgressDialog |
createProgressDialog(android.content.Context context,
java.lang.String title,
java.lang.String text,
boolean cancelable,
boolean show)
Create progress dialog with params filled
|
static void |
generateDialogInfo(android.content.Context context,
int iconRes,
java.lang.String title,
java.lang.String msg)
Shows info dialog with simple OK button and custom icon when iconRes not zero
|
static void |
generateNoInternetDialog(android.content.Context context)
No internet error dialog with message "No internet connection"
|
static android.app.ProgressDialog |
getProgressDialogWait(android.content.Context context,
java.lang.String text,
boolean cancelable)
Get progress dialog
|
public static android.app.AlertDialog createAlertDialog(android.content.Context context,
@DrawableRes
int resId,
java.lang.String title,
java.lang.String message,
boolean cancelable,
boolean showDialog,
java.lang.String[] buttonTexts,
android.content.DialogInterface.OnClickListener listener)
AlertDialog with the params filled.context - Context of class/ActivityresId - drawable resource id, put 0 if not want to set anytitle - put null if not want to set, Valid String value otherwisemessage - put null if not want to set, Valid String value otherwisecancelable - true if want to make dialog cancelable, false otherwiseshowDialog - true if want to show dialog, false otherwisebuttonTexts - Array of button text as [postive_button_text, negative_button_text]listener - DialogInterface.OnClickListenerAlertDialogpublic static void generateDialogInfo(android.content.Context context,
int iconRes,
java.lang.String title,
java.lang.String msg)
iconRes - - icon's drawable resourcepublic static void generateNoInternetDialog(android.content.Context context)
public static android.app.ProgressDialog getProgressDialogWait(android.content.Context context,
java.lang.String text,
boolean cancelable)
public static android.app.ProgressDialog createProgressDialog(android.content.Context context,
java.lang.String title,
java.lang.String text,
boolean cancelable,
boolean show)