Abstract base class which presents a dialog associated with a
DialogPreference. Since the preference object may
not be available during fragment re-creation, the necessary information for displaying the dialog
is read once during the initial call to onCreate(Bundle) and saved/restored in the saved
instance state. Custom subclasses should also follow this pattern.

Note that this can be called while the fragment's activity is
still in the process of being created. As such, you can not rely
on things like the activity's content view hierarchy being initialized
at this point. If you want to do work once the activity itself is
created, see onActivityCreated(Bundle).

Any restored child fragments will be created before the base
Fragment.onCreate method returns.

Parameters

savedInstanceState

Bundle: If the fragment is being re-created from
a previous saved state, this is the state.

onCreateDialog

Override to build your own custom Dialog container. This is typically
used to show an AlertDialog instead of a generic Dialog; when doing so,
onCreateView(LayoutInflater, ViewGroup, Bundle) does not need
to be implemented since the AlertDialog takes care of its own content.

This corresponds to Activity.onSaveInstanceState(Bundle) and most of the discussion there
applies here as well. Note however: this method may be called
at any time before onDestroy(). There are many situations
where a fragment may be mostly torn down (such as when placed on the
back stack with no UI showing), but its state will not be saved until
its owning activity actually needs to save its state.