public class AppCompatDialogFragment extends DialogFragment
DialogFragment
which uses an AppCompatDialog
in place of a
platform-styled dialog.DialogFragment
Fragment.InstantiationException, Fragment.SavedState
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
Constructor and Description |
---|
AppCompatDialogFragment() |
Modifier and Type | Method and Description |
---|---|
Dialog |
onCreateDialog(Bundle savedInstanceState)
Override to build your own custom Dialog container.
|
void |
setupDialog(Dialog dialog,
int style) |
dismiss, dismissAllowingStateLoss, getDialog, getLayoutInflater, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onCancel, onCreate, onDestroyView, onDetach, onDismiss, onSaveInstanceState, onStart, onStop, setCancelable, setShowsDialog, setStyle, show, show
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onViewCreated, onViewStateRestored, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, toString, unregisterForContextMenu
public Dialog onCreateDialog(Bundle savedInstanceState)
DialogFragment
Fragment.onCreateView(LayoutInflater, ViewGroup, Bundle)
does not need
to be implemented since the AlertDialog takes care of its own content.
This method will be called after DialogFragment.onCreate(Bundle)
and
before Fragment.onCreateView(LayoutInflater, ViewGroup, Bundle)
. The
default implementation simply instantiates and returns a Dialog
class.
Note: DialogFragment own the Dialog.setOnCancelListener
and Dialog.setOnDismissListener
callbacks. You must not set them yourself.
To find out about these events, override DialogFragment.onCancel(DialogInterface)
and DialogFragment.onDismiss(DialogInterface)
.
onCreateDialog
in class DialogFragment
savedInstanceState
- The last saved instance state of the Fragment,
or null if this is a freshly created Fragment.public void setupDialog(Dialog dialog, int style)
setupDialog
in class DialogFragment