Android Guides | Samples

Android.App.Fragment: Method Members

The methods of Android.App.Fragment are listed below. For a list of all members, see the Fragment list.

See Also: Object

Public Methods

Dump(String, FileDescriptor, PrintWriter, String[])
Print the Fragments's state into the given stream.
override
Equals(Object) : Boolean
Subclasses can not override equals().
override
GetHashCode() : Int32
Subclasses can not override hashCode().
GetString(Int32) : String
Return a localized string from the application's package's default string table.
GetString(Int32, params Object[]) : String
GetText(Int32) : String
GetTextFormatted(Int32) : ICharSequence
Return a localized, styled CharSequence from the application's package's default string table.
static
Instantiate(Context, String) : Fragment
Like Fragment.Instantiate(Context,String,String) but with a null argument Bundle.
static
Instantiate(Context, String, Bundle) : Fragment
Create a new instance of a Fragment with the given class name.
OnActivityCreated(Bundle)
Called when the fragment's activity has been created and this fragment's view hierarchy instantiated.
OnActivityResult(Int32, Result, Intent)
Receive the result from a previous call to Fragment.StartActivityForResult(Intent,Int32).
OnAttach(Activity)
OnConfigurationChanged(Configuration)
Called by the system when the device configuration changes while your component is running.
OnContextItemSelected(IMenuItem) : Boolean
This hook is called whenever an item in a context menu is selected.
OnCreate(Bundle)
Called to do initial creation of a fragment.
OnCreateAnimator(FragmentTransit, Boolean, Int32) : Animator
Called when a fragment loads an animation.
OnCreateContextMenu(IContextMenu, View, IContextMenuContextMenuInfo)
Called when a context menu for the view is about to be shown.
OnCreateOptionsMenu(IMenu, MenuInflater)
Initialize the contents of the Activity's standard options menu.
OnCreateView(LayoutInflater, ViewGroup, Bundle) : View
Called to have the fragment instantiate its user interface view.
OnDestroy()
Called when the fragment is no longer in use.
OnDestroyOptionsMenu()
Called when this fragment's option menu items are no longer being included in the overall options menu.
OnDestroyView()
Called when the view previously created by Fragment.OnCreateView(LayoutInflater,ViewGroup,ViewGroup) has been detached from the fragment.
OnDetach()
Called when the fragment is no longer attached to its activity.
OnHiddenChanged(Boolean)
Called when the hidden state (as returned by Fragment.IsHidden of the fragment has changed.
OnInflate(IAttributeSet, Bundle)
OnInflate(Activity, IAttributeSet, Bundle)
OnLowMemory()
This is called when the overall system is running low on memory, and actively running processes should trim their memory usage.
OnOptionsItemSelected(IMenuItem) : Boolean
This hook is called whenever an item in your options menu is selected.
OnOptionsMenuClosed(IMenu)
This hook is called whenever the options menu is being closed (either by the user canceling the menu with the back/menu button, or when an item is selected).
OnPause()
Called when the Fragment is no longer resumed.
OnPrepareOptionsMenu(IMenu)
Prepare the Screen's standard options menu to be displayed.
OnResume()
Called when the fragment is visible to the user and actively running.
OnSaveInstanceState(Bundle)
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.
OnStart()
Called when the Fragment is visible to the user.
OnStop()
Called when the Fragment is no longer started.
OnTrimMemory(TrimMemory)
Called when the operating system has determined that it is a good time for a process to trim unneeded memory from its process.
OnViewCreated(View, Bundle)
Called immediately after Fragment.OnCreateView(LayoutInflater,ViewGroup,ViewGroup) has returned, but before any saved state has been restored in to the view.
OnViewStateRestored(Bundle)
Called when all saved state has been restored into the view hierarchy of the fragment.
RegisterForContextMenu(View)
Registers a context menu to be shown for the given view (multiple views can show the context menu).
SetEnterSharedElementCallback(SharedElementCallback)
When custom transitions are used with Fragments, the enter transition callback is called when this Fragment is attached or detached when not popping the back stack.
SetExitSharedElementCallback(SharedElementCallback)
When custom transitions are used with Fragments, the exit transition callback is called when this Fragment is attached or detached when popping the back stack.
SetHasOptionsMenu(Boolean)
Report that this fragment would like to participate in populating the options menu by receiving a call to Fragment.OnCreateOptionsMenu(IMenu,MenuInflater) and related methods.
SetInitialSavedState(Fragment+SavedState)
Set the initial saved state that this Fragment should restore itself from when first being constructed, as returned by FragmentManager.SaveFragmentInstanceState(Fragment).
SetMenuVisibility(Boolean)
Set a hint for whether this fragment's menu should be visible.
SetTargetFragment(Fragment, Int32)
Optional target for this fragment.
StartActivity(Intent)
Call Context.StartActivity from the fragment's containing Activity.
StartActivity(Intent, Bundle)
Call Activity.startActivity(android.content.Intent, android.os.Bundle) from the fragment's containing Activity.
StartActivityForResult(Intent, Int32)
Call Activity.StartActivityForResult(Intent,Int32) from the fragment's containing Activity.
StartActivityForResult(Intent, Int32, Bundle)
Call Activity.StartActivityForResult(Intent,Int32,Int32) from the fragment's containing Activity.
UnregisterForContextMenu(View)
Prevents a context menu to be shown for the given view.