ErrorDialogFragment

Kotlin|Java

public classErrorDialogFragment extendsDialogFragment


Wraps theDialog returned by getErrorDialog by using so that it can be properly managed by the .

If you are using an Activity from the support library, useSupportErrorDialogFragment instead.

Summary

Public constructors

Public methods

static @NonNullErrorDialogFragment

Create aDialogFragment for displaying the getErrorDialog.

static @NonNullErrorDialogFragment
newInstance(
    Dialog dialog,
    @NullableDialogInterface.OnCancelListener cancelListener
)

Create aDialogFragment for displaying the getErrorDialog with an OnCancelListener.

void

This method is deprecated.

@NonNullDialog
onCreateDialog(@NullableBundle savedInstanceState)

Returns aDialog created by getErrorDialog with the provided errorCode, activity, request code, and cancel listener.

void

This method is deprecated.

Inherited Constants

Fromandroid.content.ComponentCallbacks2
static final int
static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int
Fromandroid.app.DialogFragment
static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

Inherited methods

Fromandroid.app.DialogFragment
void

This method is deprecated.

void

This method is deprecated.

void
dump(String p, FileDescriptor p1, PrintWriter p2, String[] p3)

This method is deprecated.

Dialog

This method is deprecated.

boolean

This method is deprecated.

int

This method is deprecated.

boolean

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

LayoutInflater

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void
setCancelable(boolean p)

This method is deprecated.

void
setShowsDialog(boolean p)

This method is deprecated.

void
setStyle(int p, int p1)

This method is deprecated.

int

This method is deprecated.

Fromandroid.app.Fragment
final boolean

This method is deprecated.

finalActivity

This method is deprecated.

boolean

This method is deprecated.

boolean

This method is deprecated.

finalBundle

This method is deprecated.

finalFragmentManager

This method is deprecated.

Context

This method is deprecated.

Transition

This method is deprecated.

Transition

This method is deprecated.

finalFragmentManager

This method is deprecated.

finalObject

This method is deprecated.

final int

This method is deprecated.

finalLayoutInflater

This method is deprecated.

LoaderManager

This method is deprecated.

finalFragment

This method is deprecated.

Transition

This method is deprecated.

finalResources

This method is deprecated.

final boolean

This method is deprecated.

Transition

This method is deprecated.

Transition

This method is deprecated.

Transition

This method is deprecated.

finalString
getString(int p)

This method is deprecated.

finalString

This method is deprecated.

finalFragment

This method is deprecated.

final int

This method is deprecated.

finalCharSequence
getText(int p)

This method is deprecated.

boolean

This method is deprecated.

View

This method is deprecated.

final int

This method is deprecated.

staticFragment

This method is deprecated.

final boolean

This method is deprecated.

final boolean

This method is deprecated.

final boolean

This method is deprecated.

final boolean

This method is deprecated.

final boolean

This method is deprecated.

final boolean

This method is deprecated.

final boolean

This method is deprecated.

final boolean

This method is deprecated.

void
onActivityResult(int p, int p1, Intent p2)

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

boolean

This method is deprecated.

Animator
onCreateAnimator(int p, boolean p1, int p2)

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

View

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void
onHiddenChanged(boolean p)

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

boolean

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void
onRequestPermissionsResult(int p, String[] p1, int[] p2)

This method is deprecated.

void

This method is deprecated.

void
onTrimMemory(int p)

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

final void
requestPermissions(String[] p, int p1)

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void
setHasOptionsMenu(boolean p)

This method is deprecated.

void

This method is deprecated.

void
setMenuVisibility(boolean p)

This method is deprecated.

void

This method is deprecated.

void
setRetainInstance(boolean p)

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void
setUserVisibleHint(boolean p)

This method is deprecated.

boolean

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void
startIntentSenderForResult(
    IntentSender p,
    int p1,
    Intent p2,
    int p3,
    int p4,
    int p5,
    Bundle p6
)

This method is deprecated.

void

This method is deprecated.

String

This method is deprecated.

void

This method is deprecated.

Public constructors

ErrorDialogFragment

public ErrorDialogFragment()

Public methods

newInstance

public static @NonNullErrorDialogFragment newInstance(Dialog dialog)

Create aDialogFragment for displaying the getErrorDialog.

Parameters
Dialog dialog

TheDialog created by getErrorDialog.

newInstance

public static @NonNullErrorDialogFragment newInstance(
    Dialog dialog,
    @NullableDialogInterface.OnCancelListener cancelListener
)

Create aDialogFragment for displaying the getErrorDialog with an OnCancelListener.

Parameters
Dialog dialog

TheDialog created by getErrorDialog.

@NullableDialogInterface.OnCancelListener cancelListener

ADialogInterface.OnCancelListener for when a user cancels the DialogFragment.

onCreateDialog

public @NonNullDialog onCreateDialog(@NullableBundle savedInstanceState)

Returns aDialog created by getErrorDialog with the provided errorCode, activity, request code, and cancel listener.

Parameters
@NullableBundle savedInstanceState

Not used.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-03-17 UTC.