public class ConfirmDeletionDialogFragment extends BaseDialogFragment<ConfirmationActionHandler>
A confirmation-dialog specialised for deletion/removal of things. It has two constructors:
This class will make use of the ConfirmationActionHandler. Should the Activity calling this dialog not implement this interface, a ClassCastException will be thrown with an appropriate error-message.
controller| Constructor and Description |
|---|
ConfirmDeletionDialogFragment() |
| Modifier and Type | Method and Description |
|---|---|
static ConfirmDeletionDialogFragment |
createDialog()
Static method to conveniently initialize a
ConfirmDeletionDialogFragment
object. |
static ConfirmDeletionDialogFragment |
createDialog(int messageResourceID,
String data)
Static method to conveniently initialize a
ConfirmDeletionDialogFragment
object. |
static ConfirmDeletionDialogFragment |
createDialog(String data)
Constructor for injecting a data-string helping the user to verify what should be deleted.
|
static ConfirmDeletionDialogFragment |
createDialog(String data,
boolean simpleMessage)
Constructor for injecting a data-string helping the user to verify what should be deleted.
|
void |
onCancel(android.content.DialogInterface dialog)
This method will be invoked when the dialog is canceled.
|
void |
onClick(android.content.DialogInterface dialog,
int which) |
void |
populateDialog(android.app.AlertDialog.Builder builder,
android.os.Bundle arguments)
Abstract method to populate the given builder-object with appropriate
content.
|
callInterceptor, getDialogTag, getViewInterceptor, isRegisterHandler, onAttach, onCreateDialog, setActionHandler, setRegisterHandler, setViewInterceptordismiss, dismissAllowingStateLoss, dump, getDialog, getShowsDialog, getTheme, isCancelable, onActivityCreated, onCreate, onDestroyView, onDetach, onDismiss, onSaveInstanceState, onStart, onStop, setCancelable, setShowsDialog, setStyle, show, showequals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getEnterTransition, getExitTransition, getFragmentManager, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isRemoving, isResumed, isVisible, onActivityResult, onConfigurationChanged, onContextItemSelected, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPrepareOptionsMenu, onResume, onTrimMemory, onViewCreated, onViewStateRestored, registerForContextMenu, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, startActivity, startActivity, startActivityForResult, startActivityForResult, toString, unregisterForContextMenuclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetActivity, getArgumentspublic void populateDialog(android.app.AlertDialog.Builder builder,
android.os.Bundle arguments)
BaseDialogFragmentpopulateDialog in interface DialogFragmentInterfacepopulateDialog in class BaseDialogFragment<ConfirmationActionHandler>builder - The Builder-object that should be populated and represents the
actual dialogarguments - The arguments of the DialogFragment, as retrievable via getArguments().public static ConfirmDeletionDialogFragment createDialog(String data)
data - the string that helps the user identify/verify the data, which deletion should be
confirmed.public static ConfirmDeletionDialogFragment createDialog(String data, boolean simpleMessage)
data - the string that helps the user identify/verify the data, which deletion should be
confirmed.public static ConfirmDeletionDialogFragment createDialog(int messageResourceID, String data)
Static method to conveniently initialize a ConfirmDeletionDialogFragment
object.
This method initializes the dialog fragment with a custom message and some data that is meant
to specify what to actually delete.
The message-string provided by the messageResourceID has to contain one
"%s" in order for the data to appear within it.
messageResourceID - The message-template to be useddata - the string that helps the user identify/verify the data, which
deletion should be confirmed.public static ConfirmDeletionDialogFragment createDialog()
Static method to conveniently initialize a ConfirmDeletionDialogFragment
object.
This method initializes the dialog fragment with a default message.
public void onCancel(android.content.DialogInterface dialog)
onCancel in interface android.content.DialogInterface.OnCancelListeneronCancel in class android.app.DialogFragmentdialog - The dialog that was canceled will be passed into the method.public void onClick(android.content.DialogInterface dialog,
int which)