SupportErrorDialogFragment

public class SupportErrorDialogFragment extends DialogFragment


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

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

Summary

Public constructors

Public methods

static @NonNull SupportErrorDialogFragment

Create a DialogFragment for displaying the getErrorDialog.

static @NonNull SupportErrorDialogFragment
newInstance(
    Dialog dialog,
    @Nullable DialogInterface.OnCancelListener cancelListener
)

Create a DialogFragment for displaying the getErrorDialog with an OnCancelListener.

void
@NonNull Dialog
onCreateDialog(@Nullable Bundle savedInstanceState)

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

void

Inherited Constants

From androidx.fragment.app.DialogFragment
static final int
static final int
static final int
static final int

Inherited methods

From androidx.fragment.app.DialogFragment
void
void
void
@Nullable Dialog
boolean
int
boolean
void
onActivityCreated(@Nullable Bundle savedInstanceState)

This method is deprecated.

void
void
onCreate(@Nullable Bundle savedInstanceState)
void
void
void
@NonNull LayoutInflater
onGetLayoutInflater(@Nullable Bundle savedInstanceState)
void
void
void
void
onViewStateRestored(@Nullable Bundle savedInstanceState)
final @NonNull ComponentDialog
final @NonNull Dialog
void
setCancelable(boolean cancelable)
void
setShowsDialog(boolean showsDialog)
void
setStyle(int style, int theme)
void
setupDialog(@NonNull Dialog dialog, int style)
int
void
From androidx.fragment.app.Fragment
void
dump(
    @NonNull String prefix,
    @Nullable FileDescriptor fd,
    @NonNull PrintWriter writer,
    @Nullable String[] args
)
final boolean
final @Nullable FragmentActivity
boolean
boolean
final @Nullable Bundle
final @NonNull FragmentManager
@Nullable Context
@NonNull CreationExtras
@NonNull ViewModelProvider.Factory
Object
Object
final @Nullable FragmentManager

This method is deprecated.

final Object
final int
final @NonNull LayoutInflater
@NonNull Lifecycle
@NonNull LoaderManager

This method is deprecated.

final @Nullable Fragment
final @NonNull FragmentManager
Object
final @NonNull Resources
final boolean

This method is deprecated.

Object
final @NonNull SavedStateRegistry
Object
Object
final @NonNull String
getString(int resId)
final @Nullable String
final @Nullable Fragment

This method is deprecated.

final int

This method is deprecated.

final @NonNull CharSequence
getText(int resId)
boolean

This method is deprecated.

@Nullable View
@NonNull LifecycleOwner
@NonNull LiveData<LifecycleOwner>
@NonNull ViewModelStore
final boolean
final int
static @NonNull Fragment

This method is deprecated.

final boolean
final boolean
final boolean
final boolean
final boolean
final boolean
final boolean
final boolean
final boolean
void
onActivityResult(int requestCode, int resultCode, @Nullable Intent data)

This method is deprecated.

void

This method is deprecated.

void
boolean
@Nullable Animation
onCreateAnimation(int transit, boolean enter, int nextAnim)
@Nullable Animator
onCreateAnimator(int transit, boolean enter, int nextAnim)
void
void

This method is deprecated.

@Nullable View
onCreateView(
    @NonNull LayoutInflater inflater,
    @Nullable ViewGroup container,
    @Nullable Bundle savedInstanceState
)
void
void

This method is deprecated.

void
onHiddenChanged(boolean hidden)
void
onInflate(
    @NonNull Context context,
    @NonNull AttributeSet attrs,
    @Nullable Bundle savedInstanceState
)
void

This method is deprecated.

void
onMultiWindowModeChanged(boolean isInMultiWindowMode)
boolean

This method is deprecated.

void

This method is deprecated.

void
void
onPictureInPictureModeChanged(boolean isInPictureInPictureMode)
void

This method is deprecated.

void
onPrimaryNavigationFragmentChanged(
    boolean isPrimaryNavigationFragment
)
void
onRequestPermissionsResult(
    int requestCode,
    @NonNull String[] permissions,
    @NonNull int[] grantResults
)

This method is deprecated.

void
void
onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState)
void
final @NonNull ActivityResultLauncher<I>
<I, O> registerForActivityResult(
    @NonNull ActivityResultContract<I, O> contract,
    @NonNull ActivityResultCallback<O> callback
)
void
final void
requestPermissions(@NonNull String[] permissions, int requestCode)

This method is deprecated.

final @NonNull FragmentActivity
final @NonNull Bundle
final @NonNull Context
final @NonNull FragmentManager

This method is deprecated.

final @NonNull Object
final @NonNull Fragment
final @NonNull View
void
void
void
void
void
void
void
void
setHasOptionsMenu(boolean hasMenu)

This method is deprecated.

void
void
setMenuVisibility(boolean menuVisible)
void
void
setRetainInstance(boolean retain)

This method is deprecated.

void
void
void
void
setTargetFragment(@Nullable Fragment fragment, int requestCode)

This method is deprecated.

void
setUserVisibleHint(boolean isVisibleToUser)

This method is deprecated.

boolean
void
void
startActivityForResult(@NonNull Intent intent, int requestCode)

This method is deprecated.

void
startIntentSenderForResult(
    @NonNull IntentSender intent,
    int requestCode,
    @Nullable Intent fillInIntent,
    int flagsMask,
    int flagsValues,
    int extraFlags,
    @Nullable Bundle options
)

This method is deprecated.

void
@NonNull String
void

Public constructors

SupportErrorDialogFragment

public SupportErrorDialogFragment()

Public methods

newInstance

public static @NonNull SupportErrorDialogFragment newInstance(Dialog dialog)

Create a DialogFragment for displaying the getErrorDialog.

Parameters
Dialog dialog

The Dialog created by getErrorDialog.

newInstance

public static @NonNull SupportErrorDialogFragment newInstance(
    Dialog dialog,
    @Nullable DialogInterface.OnCancelListener cancelListener
)

Create a DialogFragment for displaying the getErrorDialog with an OnCancelListener.

Parameters
Dialog dialog

The Dialog created by getErrorDialog.

@Nullable DialogInterface.OnCancelListener cancelListener

A DialogInterface.OnCancelListener for when a user cancels the DialogFragment.

onCancel

public void onCancel(DialogInterface dialog)

onCreateDialog

public @NonNull Dialog onCreateDialog(@Nullable Bundle savedInstanceState)

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

Parameters
@Nullable Bundle savedInstanceState

Not used.

show

public void show(FragmentManager manager, @Nullable String tag)