public class EditTextPreferenceDialogFragmentCompat extends PreferenceDialogFragmentCompat
Fragment.InstantiationException, Fragment.SavedState
ARG_KEY
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
Constructor and Description |
---|
EditTextPreferenceDialogFragmentCompat() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
needInputMethod()
Returns whether the preference needs to display a soft input method when the dialog
is displayed.
|
static EditTextPreferenceDialogFragmentCompat |
newInstance(String key) |
protected void |
onBindDialogView(View view)
Binds views in the content View of the dialog to data.
|
void |
onCreate(Bundle savedInstanceState)
Called to do initial creation of a fragment.
|
void |
onDialogClosed(boolean positiveResult) |
void |
onSaveInstanceState(Bundle outState)
Called to ask the fragment to save its current dynamic state, so it
can later be reconstructed in a new instance of its process is
restarted.
|
getPreference, onClick, onCreateDialog, onCreateDialogView, onDismiss, onPrepareDialogBuilder
dismiss, dismissAllowingStateLoss, getDialog, getLayoutInflater, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onCancel, onDestroyView, onDetach, onStart, onStop, setCancelable, setShowsDialog, setStyle, setupDialog, show, show
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onViewCreated, onViewStateRestored, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, toString, unregisterForContextMenu
public EditTextPreferenceDialogFragmentCompat()
public static EditTextPreferenceDialogFragmentCompat newInstance(String key)
public void onCreate(Bundle savedInstanceState)
Fragment
Fragment.onAttach(Activity)
and before
Fragment.onCreateView(LayoutInflater, ViewGroup, Bundle)
.
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 Fragment.onActivityCreated(Bundle)
.
Any restored child fragments will be created before the base
Fragment.onCreate
method returns.
onCreate
in class PreferenceDialogFragmentCompat
savedInstanceState
- If the fragment is being re-created from
a previous saved state, this is the state.public void onSaveInstanceState(@NonNull Bundle outState)
Fragment
Fragment.onCreate(Bundle)
,
Fragment.onCreateView(LayoutInflater, ViewGroup, Bundle)
, and
Fragment.onActivityCreated(Bundle)
.
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 Fragment.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.
onSaveInstanceState
in class PreferenceDialogFragmentCompat
outState
- Bundle in which to place your saved state.protected void onBindDialogView(View view)
PreferenceDialogFragmentCompat
Make sure to call through to the superclass implementation.
onBindDialogView
in class PreferenceDialogFragmentCompat
view
- The content View of the dialog, if it is custom.protected boolean needInputMethod()
PreferenceDialogFragmentCompat
needInputMethod
in class PreferenceDialogFragmentCompat
public void onDialogClosed(boolean positiveResult)
onDialogClosed
in class PreferenceDialogFragmentCompat