public class DialogUtils
extends java.lang.Object
Constructor and Description |
---|
DialogUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
showCustomViewDialog(android.content.Context context,
android.view.LayoutInflater layoutInflater,
int viewResourceId,
int titleResourceId)
Shows a dialog with a custom view and ok button
|
static void |
showMaterialInfoDialog(android.content.Context context,
int titleResourceId,
int messageResourceId,
int positiveButtonResourceId)
To display a Material Dialog box, with title, content and a button
|
static void |
showWithMessageAndOkButton(android.content.Context context,
int titleResourceId,
int messageResourceId,
int buttonResourceId)
Displays a basic dialog with a button
|
public static void showWithMessageAndOkButton(android.content.Context context, int titleResourceId, int messageResourceId, int buttonResourceId)
Note: Do not pass getBaseContext() and instead this from an activity
context
- the contexttitleResourceId
- title resource idmessageResourceId
- message resource idpublic static void showMaterialInfoDialog(android.content.Context context, int titleResourceId, int messageResourceId, int positiveButtonResourceId)
context
- the contexttitleResourceId
- title resource idmessageResourceId
- message resource idpositiveButtonResourceId
- positive button resource idpublic static void showCustomViewDialog(android.content.Context context, android.view.LayoutInflater layoutInflater, int viewResourceId, int titleResourceId)
context
- the contextlayoutInflater
- to inflate the custom viewviewResourceId
- view resource idtitleResourceId
- title resource id