ListFragment ListFragment Class

Definition

A fragment that displays a list of items by binding to a data source such as an array or Cursor, and exposes event handlers when the user selects an item.

[Android.Runtime.Register("android/app/ListFragment", ApiSince=11, DoNotGenerateAcw=true)]
public class ListFragment : Android.App.Fragment
type ListFragment = class
    inherit Fragment
Inheritance
Attributes

Remarks

Android platform documentation

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

ListFragment() ListFragment()
ListFragment(IntPtr, JniHandleOwnership) ListFragment(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Properties

Activity Activity

Return the Activity this fragment is currently associated with.

(Inherited from Fragment)
AllowEnterTransitionOverlap AllowEnterTransitionOverlap

Returns whether the the exit transition and enter transition overlap or not.

(Inherited from Fragment)
AllowReturnTransitionOverlap AllowReturnTransitionOverlap

Returns whether the the return transition and reenter transition overlap or not.

(Inherited from Fragment)
Arguments Arguments

Return the arguments supplied to Arguments, if any.

(Inherited from Fragment)
ChildFragmentManager ChildFragmentManager

Return a private FragmentManager for placing and managing Fragments inside of this Fragment.

(Inherited from Fragment)
Class Class

Returns the unique instance of Class that represents this object's class.

(Inherited from Object)
Context Context Inherited from Fragment
EnterTransition EnterTransition

Returns the Transition that will be used to move Views into the initial scene.

(Inherited from Fragment)
ExitTransition ExitTransition

Returns the Transition that will be used to move Views out of the scene when the fragment is removed, hidden, or detached when not popping the back stack.

(Inherited from Fragment)
FragmentManager FragmentManager

Return the FragmentManager for interacting with fragments associated with this fragment's activity.

(Inherited from Fragment)
Handle Handle

The handle to the underlying Android instance.

(Inherited from Object)
Host Host Inherited from Fragment
Id Id

Return the identifier this fragment is known by.

(Inherited from Fragment)
IJavaObjectEx.IsProxy IJavaObjectEx.IsProxy Inherited from Object
IJavaObjectEx.KeyHandle IJavaObjectEx.KeyHandle Inherited from Object
IJavaObjectEx.NeedsActivation IJavaObjectEx.NeedsActivation Inherited from Object
IJavaPeerable.JniManagedPeerState IJavaPeerable.JniManagedPeerState Inherited from Object
IsAdded IsAdded

Return true if the fragment is currently added to its activity.

(Inherited from Fragment)
IsDetached IsDetached

Return true if the fragment has been explicitly detached from the UI.

(Inherited from Fragment)
IsHidden IsHidden

Return true if the fragment has been hidden.

(Inherited from Fragment)
IsInLayout IsInLayout

Return true if the layout is included as part of an activity view hierarchy via the <fragment> tag.

(Inherited from Fragment)
IsRemoving IsRemoving

Return true if this fragment is currently being removed from its activity.

(Inherited from Fragment)
IsResumed IsResumed

Return true if the fragment is in the resumed state.

(Inherited from Fragment)
IsStateSaved IsStateSaved Inherited from Fragment
IsVisible IsVisible

Return true if the fragment is currently visible to the user.

(Inherited from Fragment)
JniIdentityHashCode JniIdentityHashCode Inherited from Object
JniPeerMembers JniPeerMembers
LayoutInflater LayoutInflater Inherited from Fragment
ListAdapter ListAdapter

Get the ListAdapter associated with this activity's ListView.

ListView ListView

Get the activity's list view widget.

LoaderManager LoaderManager

Return the LoaderManager for this fragment, creating it if needed.

(Inherited from Fragment)
ParentFragment ParentFragment

Returns the parent Fragment containing this Fragment.

(Inherited from Fragment)
PeerReference PeerReference Inherited from Object
ReenterTransition ReenterTransition

Returns the Transition that will be used to move Views in to the scene when returning due to popping a back stack.

(Inherited from Fragment)
Resources Resources

Return getActivity().getResources().

(Inherited from Fragment)
RetainInstance RetainInstance Inherited from Fragment
ReturnTransition ReturnTransition

Returns the Transition that will be used to move Views out of the scene when the Fragment is preparing to be removed, hidden, or detached because of popping the back stack.

(Inherited from Fragment)
SelectedItemId SelectedItemId

Get the cursor row ID of the currently selected list item.

SelectedItemPosition SelectedItemPosition

Get the position of the currently selected list item.

SharedElementEnterTransition SharedElementEnterTransition

Returns the Transition that will be used for shared elements transferred into the content Scene.

(Inherited from Fragment)
SharedElementReturnTransition SharedElementReturnTransition

Return the Transition that will be used for shared elements transferred back during a pop of the back stack.

(Inherited from Fragment)
Tag Tag

Get the tag name of the fragment, if specified.

(Inherited from Fragment)
TargetFragment TargetFragment

Return the target fragment set by SetTargetFragment(Fragment, Int32).

(Inherited from Fragment)
TargetRequestCode TargetRequestCode

Return the target request code set by SetTargetFragment(Fragment, Int32).

(Inherited from Fragment)
ThresholdClass ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

UserVisibleHint UserVisibleHint Inherited from Fragment
View View

M:Android.App.Fragment.OnCreateView(Android.Views.LayoutInflater,Android.Views.ViewGroup,Android.Views.ViewGroup)

(Inherited from Fragment)

Methods

Clone() Clone()

Creates and returns a copy of this Object.

(Inherited from Object)
Dispose() Dispose() Inherited from Object
Dispose(Boolean) Dispose(Boolean) Inherited from Object
Dump(String, FileDescriptor, PrintWriter, String[]) Dump(String, FileDescriptor, PrintWriter, String[])

Print the Fragments's state into the given stream.

(Inherited from Fragment)
Equals(Object) Equals(Object)

Subclasses can not override equals().

(Inherited from Fragment)
GetHashCode() GetHashCode()

Subclasses can not override hashCode().

(Inherited from Fragment)
GetString(Int32) GetString(Int32)

Return a localized string from the application's package's default string table.

(Inherited from Fragment)
GetString(Int32, Object[]) GetString(Int32, Object[]) Inherited from Fragment
GetText(Int32) GetText(Int32) Inherited from Fragment
GetTextFormatted(Int32) GetTextFormatted(Int32)

Return a localized, styled CharSequence from the application's package's default string table.

(Inherited from Fragment)
JavaFinalize() JavaFinalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)
Notify() Notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyAll() NotifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
OnActivityCreated(Bundle) OnActivityCreated(Bundle)

Called when the fragment's activity has been created and this fragment's view hierarchy instantiated.

(Inherited from Fragment)
OnActivityResult(Int32, Result, Intent) OnActivityResult(Int32, Result, Intent)

Receive the result from a previous call to StartActivityForResult(Intent, Int32).

(Inherited from Fragment)
OnAttach(Activity) OnAttach(Activity) Inherited from Fragment
OnAttach(Context) OnAttach(Context) Inherited from Fragment
OnAttachFragment(Fragment) OnAttachFragment(Fragment) Inherited from Fragment
OnConfigurationChanged(Configuration) OnConfigurationChanged(Configuration)

Called by the system when the device configuration changes while your component is running.

(Inherited from Fragment)
OnContextItemSelected(IMenuItem) OnContextItemSelected(IMenuItem)

This hook is called whenever an item in a context menu is selected.

(Inherited from Fragment)
OnCreate(Bundle) OnCreate(Bundle)

Called to do initial creation of a fragment.

(Inherited from Fragment)
OnCreateAnimator(FragmentTransit, Boolean, Int32) OnCreateAnimator(FragmentTransit, Boolean, Int32)

Called when a fragment loads an animation.

(Inherited from Fragment)
OnCreateContextMenu(IContextMenu, View, IContextMenuContextMenuInfo) OnCreateContextMenu(IContextMenu, View, IContextMenuContextMenuInfo)

Called when a context menu for the view is about to be shown.

(Inherited from Fragment)
OnCreateOptionsMenu(IMenu, MenuInflater) OnCreateOptionsMenu(IMenu, MenuInflater)

Initialize the contents of the Activity's standard options menu.

(Inherited from Fragment)
OnCreateView(LayoutInflater, ViewGroup, Bundle) OnCreateView(LayoutInflater, ViewGroup, Bundle)

Called to have the fragment instantiate its user interface view.

(Inherited from Fragment)
OnDestroy() OnDestroy()

Called when the fragment is no longer in use.

(Inherited from Fragment)
OnDestroyOptionsMenu() OnDestroyOptionsMenu()

Called when this fragment's option menu items are no longer being included in the overall options menu.

(Inherited from Fragment)
OnDestroyView() OnDestroyView()

M:Android.App.Fragment.OnCreateView(Android.Views.LayoutInflater,Android.Views.ViewGroup,Android.Views.ViewGroup)

(Inherited from Fragment)
OnDetach() OnDetach()

Called when the fragment is no longer attached to its activity.

(Inherited from Fragment)
OnGetLayoutInflater(Bundle) OnGetLayoutInflater(Bundle) Inherited from Fragment
OnHiddenChanged(Boolean) OnHiddenChanged(Boolean)

Called when the hidden state (as returned by IsHidden of the fragment has changed.

(Inherited from Fragment)
OnInflate(Activity, IAttributeSet, Bundle) OnInflate(Activity, IAttributeSet, Bundle) Inherited from Fragment
OnInflate(Context, IAttributeSet, Bundle) OnInflate(Context, IAttributeSet, Bundle) Inherited from Fragment
OnInflate(IAttributeSet, Bundle) OnInflate(IAttributeSet, Bundle) Inherited from Fragment
OnListItemClick(ListView, View, Int32, Int64) OnListItemClick(ListView, View, Int32, Int64)

This method will be called when an item in the list is selected.

OnLowMemory() OnLowMemory()

This is called when the overall system is running low on memory, and actively running processes should trim their memory usage.

(Inherited from Fragment)
OnMultiWindowModeChanged(Boolean) OnMultiWindowModeChanged(Boolean) Inherited from Fragment
OnMultiWindowModeChanged(Boolean, Configuration) OnMultiWindowModeChanged(Boolean, Configuration) Inherited from Fragment
OnOptionsItemSelected(IMenuItem) OnOptionsItemSelected(IMenuItem)

This hook is called whenever an item in your options menu is selected.

(Inherited from Fragment)
OnOptionsMenuClosed(IMenu) 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).

(Inherited from Fragment)
OnPause() OnPause()

Called when the Fragment is no longer resumed.

(Inherited from Fragment)
OnPictureInPictureModeChanged(Boolean) OnPictureInPictureModeChanged(Boolean) Inherited from Fragment
OnPictureInPictureModeChanged(Boolean, Configuration) OnPictureInPictureModeChanged(Boolean, Configuration) Inherited from Fragment
OnPrepareOptionsMenu(IMenu) OnPrepareOptionsMenu(IMenu)

Prepare the Screen's standard options menu to be displayed.

(Inherited from Fragment)
OnRequestPermissionsResult(Int32, String[], Permission[]) OnRequestPermissionsResult(Int32, String[], Permission[]) Inherited from Fragment
OnResume() OnResume()

Called when the fragment is visible to the user and actively running.

(Inherited from Fragment)
OnSaveInstanceState(Bundle) 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.

(Inherited from Fragment)
OnStart() OnStart()

Called when the Fragment is visible to the user.

(Inherited from Fragment)
OnStop() OnStop()

Called when the Fragment is no longer started.

(Inherited from Fragment)
OnTrimMemory(TrimMemory) 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.

(Inherited from Fragment)
OnViewCreated(View, Bundle) OnViewCreated(View, Bundle) Inherited from Fragment
OnViewStateRestored(Bundle) OnViewStateRestored(Bundle)

Called when all saved state has been restored into the view hierarchy of the fragment.

(Inherited from Fragment)
PostponeEnterTransition() PostponeEnterTransition() Inherited from Fragment
RegisterForContextMenu(View) RegisterForContextMenu(View)

Registers a context menu to be shown for the given view (multiple views can show the context menu).

(Inherited from Fragment)
RequestPermissions(String[], Int32) RequestPermissions(String[], Int32) Inherited from Fragment
SetEmptyText(ICharSequence) SetEmptyText(ICharSequence)

The default content for a ListFragment has a TextView that can be shown when the list is empty.

SetEmptyText(String) SetEmptyText(String)
SetEnterSharedElementCallback(SharedElementCallback) 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.

(Inherited from Fragment)
SetExitSharedElementCallback(SharedElementCallback) 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.

(Inherited from Fragment)
SetHandle(IntPtr, JniHandleOwnership) SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetHasOptionsMenu(Boolean) SetHasOptionsMenu(Boolean)

Report that this fragment would like to participate in populating the options menu by receiving a call to OnCreateOptionsMenu(IMenu, MenuInflater) and related methods.

(Inherited from Fragment)
SetInitialSavedState(Fragment+SavedState) SetInitialSavedState(Fragment+SavedState)

Set the initial saved state that this Fragment should restore itself from when first being constructed, as returned by SaveFragmentInstanceState(Fragment).

(Inherited from Fragment)
SetListShown(Boolean) SetListShown(Boolean)

Control whether the list is being displayed.

SetListShownNoAnimation(Boolean) SetListShownNoAnimation(Boolean)

Like SetListShown(Boolean), but no animation is used when transitioning from the previous state.

SetMenuVisibility(Boolean) SetMenuVisibility(Boolean)

Set a hint for whether this fragment's menu should be visible.

(Inherited from Fragment)
SetSelection(Int32) SetSelection(Int32)

Set the currently selected list item to the specified position with the adapter's data

SetTargetFragment(Fragment, Int32) SetTargetFragment(Fragment, Int32)

Optional target for this fragment.

(Inherited from Fragment)
ShouldShowRequestPermissionRationale(String) ShouldShowRequestPermissionRationale(String) Inherited from Fragment
StartActivity(Intent) StartActivity(Intent)

M:Android.Content.Context.StartActivity

(Inherited from Fragment)
StartActivity(Intent, Bundle) StartActivity(Intent, Bundle)

Android.App.Activity.startActivity(android.content.Intent,android.os.Bundle)

(Inherited from Fragment)
StartActivityForResult(Intent, Int32) StartActivityForResult(Intent, Int32)

Call StartActivityForResult(Intent, Int32) from the fragment's containing Activity.

(Inherited from Fragment)
StartActivityForResult(Intent, Int32, Bundle) StartActivityForResult(Intent, Int32, Bundle)

M:Android.App.Activity.StartActivityForResult(Android.Content.Intent,System.Int32,System.Int32)

(Inherited from Fragment)
StartIntentSenderForResult(IntentSender, Int32, Intent, ActivityFlags, ActivityFlags, Int32, Bundle) StartIntentSenderForResult(IntentSender, Int32, Intent, ActivityFlags, ActivityFlags, Int32, Bundle) Inherited from Fragment
StartPostponedEnterTransition() StartPostponedEnterTransition() Inherited from Fragment
ToArray<T>() ToArray<T>() Inherited from Object
ToString() ToString()

Returns a string containing a concise, human-readable description of this object.

(Inherited from Object)
UnregisterForContextMenu(View) UnregisterForContextMenu(View)

Prevents a context menu to be shown for the given view.

(Inherited from Fragment)
UnregisterFromRuntime() UnregisterFromRuntime() Inherited from Object
Wait() Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)
Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)

Explicit Interface Implementations

IJavaObjectEx.ToLocalJniHandle() IJavaObjectEx.ToLocalJniHandle() Inherited from Object
IJavaPeerable.Disposed() IJavaPeerable.Disposed() Inherited from Object
IJavaPeerable.DisposeUnlessReferenced() IJavaPeerable.DisposeUnlessReferenced() Inherited from Object
IJavaPeerable.Finalized() IJavaPeerable.Finalized() Inherited from Object
IJavaPeerable.SetJniIdentityHashCode(Int32) IJavaPeerable.SetJniIdentityHashCode(Int32) Inherited from Object
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) Inherited from Object
IJavaPeerable.SetPeerReference(JniObjectReference) IJavaPeerable.SetPeerReference(JniObjectReference) Inherited from Object

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable) GetJniTypeName(IJavaPeerable)

Applies to