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 titleId,
int messageId,
int buttonLabelId,
DialogInterface.OnClickListener clickListener)
Creates an AlertDialog with a neutral button
|
static AlertDialog |
createPositiveNegativeDialog(Context context,
int layoutId,
int titleId,
int messageId,
int acceptLabel,
int cancelLabel,
DialogInterface.OnClickListener positiveListener,
DialogInterface.OnClickListener negativeListener,
DialogInterface.OnCancelListener cancelListener)
Creates an AlertDialog 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 titleId, int messageId, int buttonLabelId, DialogInterface.OnClickListener clickListener)
context
- Application contexttitleId
- 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 layoutId, int titleId, int messageId, int acceptLabel, int cancelLabel, 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 stringpositiveListener
- 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