public class DialogFactory extends Object
Constructor and Description |
---|
DialogFactory() |
Modifier and Type | Method and Description |
---|---|
static AlertDialog |
createErrorDialog(Context context,
String tag,
String message,
Exception ex,
boolean sendException,
boolean isDebuggable,
DialogInterface.OnClickListener onClickListener)
Creates an error dialog and sends an error report
|
static AlertDialog |
createNeutralDialog(Context context,
int layoutId,
int titleId,
int messageId,
int buttonLabelId,
DialogInterface.OnClickListener clickListener)
Creates an AlertDialog with a neutral button
|
static AlertDialog |
createPositiveNegativeDialog(Context context,
int iconId,
int layoutId,
int titleId,
int messageId,
int acceptLabel,
int cancelLabel,
boolean cancelable,
DialogInterface.OnClickListener positiveListener,
DialogInterface.OnClickListener negativeListener,
DialogInterface.OnCancelListener cancelListener)
Creates an AlertDialog with a positive button and a negative button
|
static AlertDialog |
createWarningDialog(Context context,
int layoutId,
int titleId,
int messageId,
int acceptLabel,
int cancelLabel,
boolean cancelable,
DialogInterface.OnClickListener positiveListener,
DialogInterface.OnClickListener negativeListener,
DialogInterface.OnCancelListener cancelListener)
Creates a warning dialog with a positive button and a negative button
|
static AlertDialog |
createWebViewDialog(Context context,
int titleId,
int contentResourceId)
Creates a Webview dialog with HTML content.
|
static AlertDialog |
createWebViewDialog(Context context,
String title,
String url)
Creates a Webview dialog with HTML content.
|
public static AlertDialog createWebViewDialog(Context context, String title, String url)
context
- Application contexttitle
- Dialog title as stringurl
- URL to be loadedpublic static AlertDialog createWebViewDialog(Context context, int titleId, int contentResourceId)
context
- Application contexttitleId
- Resource id of dialog title stringcontentResourceId
- Resource id of HTML to be loadedpublic static AlertDialog createNeutralDialog(Context context, int layoutId, int titleId, int messageId, int buttonLabelId, DialogInterface.OnClickListener clickListener)
context
- Application contextlayoutId
- Resource id of dialog layouttitleId
- Resource id of dialog title stringmessageId
- Resource id of dialog message stringbuttonLabelId
- Resource id of button label stringclickListener
- ClickListener associated to the neutral buttonpublic static AlertDialog createPositiveNegativeDialog(Context context, int iconId, int layoutId, int titleId, int messageId, int acceptLabel, int cancelLabel, boolean cancelable, DialogInterface.OnClickListener positiveListener, DialogInterface.OnClickListener negativeListener, DialogInterface.OnCancelListener cancelListener)
context
- Application contexticonId
- Resource id of dialog iconlayoutId
- Resource id of dialog layouttitleId
- Resource id of dialog title stringmessageId
- Resource id of dialog message stringacceptLabel
- Resource id of positive button label stringcancelLabel
- Resource id of negative button label stringcancelable
- Indicates if dialog is cancelablepositiveListener
- ClickListener associated to the positive buttonnegativeListener
- ClickListener associated to the negative buttoncancelListener
- ClickListener associated to the cancel dialog actionpublic static AlertDialog createWarningDialog(Context context, int layoutId, int titleId, int messageId, int acceptLabel, int cancelLabel, boolean cancelable, DialogInterface.OnClickListener positiveListener, DialogInterface.OnClickListener negativeListener, DialogInterface.OnCancelListener cancelListener)
context
- Application contextlayoutId
- Resource id of dialog layouttitleId
- Resource id of dialog title stringmessageId
- Resource id of dialog message stringacceptLabel
- Resource id of positive button label stringcancelLabel
- Resource id of negative button label stringcancelable
- Indicates if dialog is cancelablepositiveListener
- ClickListener associated to the positive buttonnegativeListener
- ClickListener associated to the negative buttoncancelListener
- ClickListener associated to the cancel dialog actionpublic static AlertDialog createErrorDialog(Context context, String tag, String message, Exception ex, boolean sendException, boolean isDebuggable, DialogInterface.OnClickListener onClickListener)
context
- Application contexttag
- Module tagmessage
- Error message stringex
- Exception thrownsendException
- true if the error report has to be sended
false otherwiseisDebuggable
- true if the application is debuggable (develop mode). Activates Logcat messages
false otherwiseonClickListener
- ClickListener associated to the neutral button