Gamebase SDK for Android  2.39.0
NHN Cloud Gamebase Platform
SimpleAlertDialog Class Reference
Collaboration diagram for SimpleAlertDialog:
Collaboration graph

Static Public Member Functions

static void show (@NonNull final Context context, @NonNull final String title, @NonNull final String message)
 
static void show (@NonNull final Context context, @NonNull final String title, @NonNull final String message, final boolean isCancelable)
 
static void show (@NonNull final Context context, @NonNull final String title, @NonNull final String message, @Nullable final DialogInterface.OnClickListener clickListener, final boolean isCancelable)
 
static void show (@NonNull final Context context, @NonNull final String title, @NonNull final String message, @Nullable final String positiveButtonText, @Nullable final DialogInterface.OnClickListener positiveListener, final boolean isCancelable)
 
static void show (@NonNull final Context context, @NonNull final String title, @NonNull final String message, @Nullable final String positiveButtonText, @Nullable final DialogInterface.OnClickListener positiveListener, @Nullable final String negativeButtonText, @Nullable final DialogInterface.OnClickListener negativeListener, final boolean isCancelable)
 
static void show (@NonNull final Context context, @NonNull final String title, @NonNull final String message, @Nullable final String positiveButtonText, @Nullable final DialogInterface.OnClickListener positiveListener, @Nullable final String negativeButtonText, @Nullable final DialogInterface.OnClickListener negativeListener, @Nullable final DialogInterface.OnCancelListener cancelListener, final boolean isCancelable)
 This method to create the dialog and display it on screen. More...
 

Member Function Documentation

◆ show() [1/6]

static void show ( @NonNull final Context  context,
@NonNull final String  title,
@NonNull final String  message 
)
static
Here is the caller graph for this function:

◆ show() [2/6]

static void show ( @NonNull final Context  context,
@NonNull final String  title,
@NonNull final String  message,
@Nullable final DialogInterface.OnClickListener  clickListener,
final boolean  isCancelable 
)
static
Here is the call graph for this function:

◆ show() [3/6]

static void show ( @NonNull final Context  context,
@NonNull final String  title,
@NonNull final String  message,
@Nullable final String  positiveButtonText,
@Nullable final DialogInterface.OnClickListener  positiveListener,
@Nullable final String  negativeButtonText,
@Nullable final DialogInterface.OnClickListener  negativeListener,
@Nullable final DialogInterface.OnCancelListener  cancelListener,
final boolean  isCancelable 
)
static

This method to create the dialog and display it on screen.

Parameters
contextThe context to use. Usually your android.app.Application or android.app.Activity object.
titleThe title displayed in the dialog.
messageThe message to display.
positiveButtonTextThe positiveButtonText displayed in the positive button.
positiveListenerThe positiveListener to be invoked when the positive button of the dialog is pressed.
negativeButtonTextThe negativeButtonText displayed in the negative button.
negativeListenerThe negativeListener to be invoked when the negative button of the dialog is pressed.
cancelListenerThe cancelListener that will be called if the dialog is canceled.
isCancelableSets whether the dialog is cancelable or not.

Example Usage:

SimpleAlertDialog.showAlert(activity,
"title",
"message",
"OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// Clicked OK.
}
}, "Cancel", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// Clicked Cancel.
}
}, new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
// Canceled...
}
}, true);

◆ show() [4/6]

static void show ( @NonNull final Context  context,
@NonNull final String  title,
@NonNull final String  message,
@Nullable final String  positiveButtonText,
@Nullable final DialogInterface.OnClickListener  positiveListener,
@Nullable final String  negativeButtonText,
@Nullable final DialogInterface.OnClickListener  negativeListener,
final boolean  isCancelable 
)
static
Here is the call graph for this function:

◆ show() [5/6]

static void show ( @NonNull final Context  context,
@NonNull final String  title,
@NonNull final String  message,
@Nullable final String  positiveButtonText,
@Nullable final DialogInterface.OnClickListener  positiveListener,
final boolean  isCancelable 
)
static
Here is the call graph for this function:

◆ show() [6/6]

static void show ( @NonNull final Context  context,
@NonNull final String  title,
@NonNull final String  message,
final boolean  isCancelable 
)
static
Here is the call graph for this function: