public class TunerFragment extends PreferenceFragment
Modifier and Type | Class and Description |
---|---|
static class |
TunerFragment.TunerWarningFragment |
PreferenceFragment.OnPreferenceDisplayDialogCallback, PreferenceFragment.OnPreferenceStartFragmentCallback, PreferenceFragment.OnPreferenceStartScreenCallback
Fragment.InstantiationException, Fragment.SavedState
Modifier and Type | Field and Description |
---|---|
static String |
SETTING_SEEN_TUNER_WARNING |
ARG_PREFERENCE_ROOT
TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN
Constructor and Description |
---|
TunerFragment() |
Modifier and Type | Method and Description |
---|---|
void |
onActivityCreated(Bundle savedInstanceState)
Called when the fragment's activity has been created and this
fragment's view hierarchy instantiated.
|
void |
onCreate(Bundle savedInstanceState)
Called to do initial creation of a fragment.
|
void |
onCreateOptionsMenu(Menu menu,
MenuInflater inflater)
Initialize the contents of the Activity's standard options menu.
|
void |
onCreatePreferences(Bundle savedInstanceState,
String rootKey)
Called during
PreferenceFragment.onCreate(Bundle) to supply the preferences for this fragment. |
boolean |
onOptionsItemSelected(MenuItem item)
This hook is called whenever an item in your options menu is selected.
|
void |
onPause()
Called when the Fragment is no longer resumed.
|
void |
onResume()
Called when the fragment is visible to the user and actively running.
|
addPreferencesFromResource, findPreference, getCallbackFragment, getListView, getPreferenceManager, getPreferenceScreen, onBindPreferences, onCreateAdapter, onCreateLayoutManager, onCreateRecyclerView, onCreateView, onDestroyView, onDisplayPreferenceDialog, onNavigateToScreen, onPreferenceTreeClick, onSaveInstanceState, onStart, onStop, onUnbindPreferences, onViewCreated, scrollToPreference, scrollToPreference, setDivider, setDividerHeight, setPreferenceScreen, setPreferencesFromResource
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimator, onCreateContextMenu, onDestroy, onDestroyOptionsMenu, onDetach, onHiddenChanged, onInflate, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsMenuClosed, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onTrimMemory, onViewStateRestored, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterSharedElementTransitionCallback, setEnterTransition, setExitSharedElementCallback, setExitSharedElementTransitionCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, toString, unregisterForContextMenu
public static final String SETTING_SEEN_TUNER_WARNING
public void onCreate(Bundle savedInstanceState)
Fragment
Fragment.onAttach(Activity)
and before
Fragment.onCreateView(LayoutInflater, ViewGroup, Bundle)
, but is not called if the fragment
instance is retained across Activity re-creation (see Fragment.setRetainInstance(boolean)
).
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)
.
If your app's targetSdkVersion
is Build.VERSION_CODES.M
or lower, child fragments being restored from the savedInstanceState are restored after
onCreate
returns. When targeting Build.VERSION_CODES.N
or
above and running on an N or newer platform version
they are restored by Fragment.onCreate
.
onCreate
in class PreferenceFragment
savedInstanceState
- If the fragment is being re-created from
a previous saved state, this is the state.public void onActivityCreated(Bundle savedInstanceState)
Fragment
Fragment.setRetainInstance(boolean)
to retain their instance,
as this callback tells the fragment when it is fully associated with
the new activity instance. This is called after Fragment.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle)
and before Fragment.onViewStateRestored(Bundle)
.onActivityCreated
in class PreferenceFragment
savedInstanceState
- If the fragment is being re-created from
a previous saved state, this is the state.public void onCreatePreferences(Bundle savedInstanceState, String rootKey)
PreferenceFragment
PreferenceFragment.onCreate(Bundle)
to supply the preferences for this fragment.
Subclasses are expected to call PreferenceFragment.setPreferenceScreen(PreferenceScreen)
either
directly or via helper methods such as PreferenceFragment.addPreferencesFromResource(int)
.onCreatePreferences
in class PreferenceFragment
savedInstanceState
- If the fragment is being re-created from
a previous saved state, this is the state.rootKey
- If non-null, this preference fragment should be rooted at the
PreferenceScreen
with this key.public void onResume()
Fragment
Activity.onResume
of the containing
Activity's lifecycle.public void onPause()
Fragment
Activity.onPause
of the containing
Activity's lifecycle.public void onCreateOptionsMenu(Menu menu, MenuInflater inflater)
Fragment
Fragment.setHasOptionsMenu(boolean)
. See
Activity.onCreateOptionsMenu
for more information.onCreateOptionsMenu
in class Fragment
menu
- The options menu in which you place your items.Fragment.setHasOptionsMenu(boolean)
,
Fragment.onPrepareOptionsMenu(android.view.Menu)
,
Fragment.onOptionsItemSelected(android.view.MenuItem)
public boolean onOptionsItemSelected(MenuItem item)
Fragment
Derived classes should call through to the base class for it to perform the default menu handling.
onOptionsItemSelected
in class Fragment
item
- The menu item that was selected.Fragment.onCreateOptionsMenu(android.view.Menu, android.view.MenuInflater)