ErrorDialogFragment | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Inherited Constants | Ctors | Methods | Inherited Methods | [Expand All]
public class

# ErrorDialogFragment

extends DialogFragment

java.lang.Object
↳ | android.app.Fragment
| ↳ | android.app.DialogFragment
|  | ↳ | com.google.android.gms.common.ErrorDialogFragment

## Class Overview

Wraps the `Dialog` returned by `getErrorDialog(int, Activity, int)` by using `DialogFragment` so that it can be properly managed by the `Activity`.

Use this class only if you are targeting API 12 and above. Otherwise, use SupportErrorDialogFragment.

## Summary

[Expand] Inherited Constants
From class android.app.DialogFragment
int | STYLE_NORMAL |
int | STYLE_NO_FRAME |
int | STYLE_NO_INPUT |
int | STYLE_NO_TITLE |
From interface android.content.ComponentCallbacks2
int | TRIM_MEMORY_BACKGROUND |
int | TRIM_MEMORY_COMPLETE |
int | TRIM_MEMORY_MODERATE |
int | TRIM_MEMORY_RUNNING_CRITICAL |
int | TRIM_MEMORY_RUNNING_LOW |
int | TRIM_MEMORY_RUNNING_MODERATE |
int | TRIM_MEMORY_UI_HIDDEN |

Public Constructors
| ErrorDialogFragment()

Public Methods
static ErrorDialogFragment | newInstance(Dialog dialog, DialogInterface.OnCancelListener cancelListener) Create a `DialogFragment` for displaying the `getErrorDialog(int, Activity, int)` with an OnCancelListener.
static ErrorDialogFragment | newInstance(Dialog dialog) Create a `DialogFragment` for displaying the `getErrorDialog(int, Activity, int)`.
void | onCancel(DialogInterface dialog)
Dialog | onCreateDialog(Bundle savedInstanceState) Returns a `Dialog` created by `getErrorDialog(int, Activity, int)` with the provided errorCode, activity, request code, and cancel listener.
void | show(FragmentManager manager, String tag)

[Expand] Inherited Methods
From class android.app.DialogFragment
void | dismiss()
void | dismissAllowingStateLoss()
void | dump(String arg0, FileDescriptor arg1, PrintWriter arg2, String[] arg3)
Dialog | getDialog()
boolean | getShowsDialog()
int | getTheme()
boolean | isCancelable()
void | onActivityCreated(Bundle arg0)
void | onAttach(Activity arg0)
void | onCancel(DialogInterface arg0)
void | onCreate(Bundle arg0)
Dialog | onCreateDialog(Bundle arg0)
void | onDestroyView()
void | onDetach()
void | onDismiss(DialogInterface arg0)
void | onSaveInstanceState(Bundle arg0)
void | onStart()
void | onStop()
void | setCancelable(boolean arg0)
void | setShowsDialog(boolean arg0)
void | setStyle(int arg0, int arg1)
int | show(FragmentTransaction arg0, String arg1)
void | show(FragmentManager arg0, String arg1)
From class android.app.Fragment
void | dump(String arg0, FileDescriptor arg1, PrintWriter arg2, String[] arg3)
final boolean | equals(Object arg0)
final Activity | getActivity()
final Bundle | getArguments()
final FragmentManager | getChildFragmentManager()
final FragmentManager | getFragmentManager()
final int | getId()
LoaderManager | getLoaderManager()
final Fragment | getParentFragment()
final Resources | getResources()
final boolean | getRetainInstance()
final String | getString(int arg0)
final String | getString(int arg0, Object... arg1)
final String | getTag()
final Fragment | getTargetFragment()
final int | getTargetRequestCode()
final CharSequence | getText(int arg0)
boolean | getUserVisibleHint()
View | getView()
final int | hashCode()
static Fragment | instantiate(Context arg0, String arg1)
static Fragment | instantiate(Context arg0, String arg1, Bundle arg2)
final boolean | isAdded()
final boolean | isDetached()
final boolean | isHidden()
final boolean | isInLayout()
final boolean | isRemoving()
final boolean | isResumed()
final boolean | isVisible()
void | onActivityCreated(Bundle arg0)
void | onActivityResult(int arg0, int arg1, Intent arg2)
void | onAttach(Activity arg0)
void | onConfigurationChanged(Configuration arg0)
boolean | onContextItemSelected(MenuItem arg0)
void | onCreate(Bundle arg0)
Animator | onCreateAnimator(int arg0, boolean arg1, int arg2)
void | onCreateContextMenu(ContextMenu arg0, View arg1, ContextMenu.ContextMenuInfo arg2)
void | onCreateOptionsMenu(Menu arg0, MenuInflater arg1)
View | onCreateView(LayoutInflater arg0, ViewGroup arg1, Bundle arg2)
void | onDestroy()
void | onDestroyOptionsMenu()
void | onDestroyView()
void | onDetach()
void | onHiddenChanged(boolean arg0)
void | onInflate(AttributeSet arg0, Bundle arg1)
void | onInflate(Activity arg0, AttributeSet arg1, Bundle arg2)
void | onLowMemory()
boolean | onOptionsItemSelected(MenuItem arg0)
void | onOptionsMenuClosed(Menu arg0)
void | onPause()
void | onPrepareOptionsMenu(Menu arg0)
void | onResume()
void | onSaveInstanceState(Bundle arg0)
void | onStart()
void | onStop()
void | onTrimMemory(int arg0)
void | onViewCreated(View arg0, Bundle arg1)
void | onViewStateRestored(Bundle arg0)
void | registerForContextMenu(View arg0)
void | setArguments(Bundle arg0)
void | setHasOptionsMenu(boolean arg0)
void | setInitialSavedState(Fragment.SavedState arg0)
void | setMenuVisibility(boolean arg0)
void | setRetainInstance(boolean arg0)
void | setTargetFragment(Fragment arg0, int arg1)
void | setUserVisibleHint(boolean arg0)
void | startActivity(Intent arg0)
void | startActivity(Intent arg0, Bundle arg1)
void | startActivityForResult(Intent arg0, int arg1)
void | startActivityForResult(Intent arg0, int arg1, Bundle arg2)
String | toString()
void | unregisterForContextMenu(View arg0)
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
From interface android.content.ComponentCallbacks
abstract void | onConfigurationChanged(Configuration arg0)
abstract void | onLowMemory()
From interface android.content.ComponentCallbacks2
abstract void | onTrimMemory(int arg0)
From interface android.content.DialogInterface.OnCancelListener
abstract void | onCancel(DialogInterface arg0)
From interface android.content.DialogInterface.OnDismissListener
abstract void | onDismiss(DialogInterface arg0)
From interface android.view.View.OnCreateContextMenuListener
abstract void | onCreateContextMenu(ContextMenu arg0, View arg1, ContextMenu.ContextMenuInfo arg2)

## Public Constructors

#### public ErrorDialogFragment ()

## Public Methods

#### public static ErrorDialogFragment newInstance (Dialog dialog, DialogInterface.OnCancelListener cancelListener)

Create a `DialogFragment` for displaying the `getErrorDialog(int, Activity, int)` with an OnCancelListener.

##### Parameters

dialog | The `Dialog` created by `getErrorDialog(int, Activity, int)`.
cancelListener | A `DialogInterface.OnCancelListener` for when a user cancels the DialogFragment.

##### Returns

- The `ErrorDialogFragment`.

#### public static ErrorDialogFragment newInstance (Dialog dialog)

Create a `DialogFragment` for displaying the `getErrorDialog(int, Activity, int)`.

##### Parameters

dialog | The `Dialog` created by `getErrorDialog(int, Activity, int)`.

##### Returns

- The `ErrorDialogFragment`.

#### public void onCancel (DialogInterface dialog)

#### public Dialog onCreateDialog (Bundle savedInstanceState)

Returns a `Dialog` created by `getErrorDialog(int, Activity, int)` with the provided errorCode, activity, request code, and cancel listener.

##### Parameters

savedInstanceState | Not used.

#### public void show (FragmentManager manager, String tag)