belongs to Maven artifact androidx.appcompat:appcompat:1.0.0-alpha1

AppCompatDialogFragment

public class AppCompatDialogFragment
extends DialogFragment

java.lang.Object
   ↳ androidx.fragment.app.Fragment
     ↳ androidx.fragment.app.DialogFragment
       ↳ androidx.appcompat.app.AppCompatDialogFragment


A special version of DialogFragment which uses an AppCompatDialog in place of a platform-styled dialog.

See also:

Summary

Inherited constants

Public constructors

AppCompatDialogFragment()

Public methods

Dialog onCreateDialog(Bundle savedInstanceState)

Override to build your own custom Dialog container.

Inherited methods

Public constructors

AppCompatDialogFragment

AppCompatDialogFragment ()

Public methods

onCreateDialog

Dialog onCreateDialog (Bundle savedInstanceState)

Override to build your own custom Dialog container. This is typically used to show an AlertDialog instead of a generic Dialog; when doing so, 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 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 onCancel(DialogInterface) and onDismiss(DialogInterface).

Parameters
savedInstanceState Bundle: The last saved instance state of the Fragment, or null if this is a freshly created Fragment.

Returns
Dialog Return a new Dialog instance to be displayed by the Fragment.