Android Guides | Samples

Android.Widget.AbsListView Class

Base class that can be used to implement virtualized lists of items.

See Also: AbsListView

Syntax

[Android.Runtime.Register("android/widget/AbsListView", DoNotGenerateAcw=true)]
public abstract class AbsListView : AdapterView<IListAdapter>, ITextWatcher, ViewTreeObserver+IOnGlobalLayoutListener, ViewTreeObserver+IOnTouchModeChangeListener, Filter+IFilterListener, IDisposable

Remarks

Base class that can be used to implement virtualized lists of items. A list does not have a spatial definition here. For instance, subclases of this class can display the content of the list in a grid, in a carousel, as stack, etc.

[Android Documentation]

Requirements

Namespace: Android.Widget
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Widget.AbsListView are listed below.

See Also: Inherited members from Android.Widget.AdapterView<Android.Widget.IListAdapter>

Public Constructors

Protected Constructors

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

Public Properties

abstract
AdapterIListAdapter.
CacheColorHintColor. When set to a non-zero value, the cache color hint indicates that this list is always drawn on top of a solid, single-color, opaque background
[read-only]
CheckedItemCountInt32. Returns the number of items currently selected.
[read-only]
CheckedItemPositionInt32. Returns the currently checked item.
[read-only]
CheckedItemPositionsSparseBooleanArray. Returns the set of checked items in the list.
ChoiceModeChoiceMode.
FastScrollAlwaysVisibleBoolean. Returns true if the fast scroller is set to always show on this view.
FastScrollEnabledBoolean. Returns true if the fast scroller is enabled.
[read-only]
HasTextFilterBoolean. Returns if the ListView currently has a text filter.
[read-only]
ListPaddingBottomInt32. List padding is the maximum of the normal view's padding and the padding of the selector.
[read-only]
ListPaddingLeftInt32. List padding is the maximum of the normal view's padding and the padding of the selector.
[read-only]
ListPaddingRightInt32. List padding is the maximum of the normal view's padding and the padding of the selector.
[read-only]
ListPaddingTopInt32. List padding is the maximum of the normal view's padding and the padding of the selector.
ScrollingCacheEnabledBoolean. Indicates whether the children's drawing cache is used during a scroll.
[read-only]
override
SelectedViewView.
SelectorDrawable. Returns the selector Drawable that is used to draw the selection in the list.
SmoothScrollbarEnabledBoolean. Returns the current state of the fast scroll feature.
StackFromBottomBoolean. Indicates whether the content of this view is pinned to, or stacked from, the bottom edge.
[read-only]
TextFilterString.
TextFilterEnabledBoolean. Indicates whether type filtering is enabled for this view
[read-only]
TextFilterFormattedICharSequence. Returns the list's text filter, if available.
TranscriptModeTranscriptMode. Returns the current transcript mode.

Protected Properties

[read-only]
IsInFilterModeBoolean. Indicates whether this view is in filter mode.
[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

AfterTextChanged(IEditable)
For our text watcher that is associated with the text filter.
BeforeTextChanged(ICharSequence, Int32, Int32, Int32)
For our text watcher that is associated with the text filter.
BeforeTextChanged(String, Int32, Int32, Int32)
CanScrollList(Int32) : Boolean
Check if the items in the list can be scrolled in a certain direction.
ClearChoices()
Clear any choices previously set
ClearTextFilter()
Clear the text filter.
DeferNotifyDataSetChanged()
This defers a notifyDataSetChanged on the pending RemoteViewsAdapter if it has not connected yet.
Fling(Int32)
Initiate a fling with the given velocity.
GetCheckedItemIds() : Int64[]
Returns the set of checked items ids.
InvalidateViews()
Causes all the views to be rebuilt and redrawn.
IsItemChecked(Int32) : Boolean
Returns the checked state of the specified position.
OnFilterComplete(Int32)
OnGlobalLayout()
Callback method to be invoked when the global layout state or the visibility of views within the view tree changes
OnInitializeAccessibilityNodeInfoForItem(View, Int32, AccessibilityNodeInfo)
Initializes an AccessibilityNodeInfo with information about a particular item in the list.
OnRemoteAdapterConnected() : Boolean
Called back when the adapter connects to the RemoteViewsService.
OnRemoteAdapterDisconnected()
Called back when the adapter disconnects from the RemoteViewsService.
OnRestoreInstanceState(IParcelable)
Hook allowing a view to re-apply a representation of its internal state that had previously been generated by View.OnSaveInstanceState.
OnSaveInstanceState() : IParcelable
Hook allowing a view to generate a representation of its internal state that can later be used to create a new instance with that same state.
OnTextChanged(ICharSequence, Int32, Int32, Int32)
For our text watcher that is associated with the text filter.
OnTextChanged(String, Int32, Int32, Int32)
OnTouchModeChanged(Boolean)
Callback method to be invoked when the touch mode changes.
PointToPosition(Int32, Int32) : Int32
Maps a point to a position in the list.
PointToRowId(Int32, Int32) : Int64
Maps a point to a the rowId of the item which intersects that point.
ReclaimViews(IList<Android.Views.View>)
ScrollListBy(Int32)
Scrolls the list items within the view by a specified number of pixels.
SetAdapter(IListAdapter)
Sets the adapter that provides the data and the views to represent the data in this widget.
SetDrawSelectorOnTop(Boolean)
Controls whether the selection highlight drawable should be drawn on top of the item or behind it.
SetFastScrollStyle(Int32)
Specifies the style of the fast scroller decorations.
SetFilterText(String)
Sets the initial value for the text filter.
SetFriction(Single)
The amount of friction applied to flings.
SetItemChecked(Int32, Boolean)
Sets the checked state of the specified position.
SetMultiChoiceModeListener(AbsListView+IMultiChoiceModeListener)
Set a NoType:android/widget/AbsListView$MultiChoiceModeListener;Href=../../../reference/android/widget/AbsListView.MultiChoiceModeListener.html that will manage the lifecycle of the selection ActionMode.
SetOnScrollListener(AbsListView+IOnScrollListener)
Set the listener that will receive notifications every time the list scrolls.
SetRecyclerListener(AbsListView+IRecyclerListener)
Sets the recycler listener to be notified whenever a View is set aside in the recycler for later reuse.
SetRemoteViewsAdapter(Intent)
Sets up this AbsListView to use a remote views adapter which connects to a RemoteViewsService through the specified intent.
SetScrollIndicators(View, View)
SetSelectionFromTop(Int32, Int32)
Sets the selected item and positions the selection y pixels from the top edge of the ListView.
SetSelector(Int32)
Set a Drawable that should be used to highlight the currently selected item.
SetVelocityScale(Single)
Sets a scale factor for the fling velocity.
SmoothScrollBy(Int32, Int32)
Smoothly scroll by distance pixels over duration milliseconds.
SmoothScrollToPosition(Int32)
Smoothly scroll to the specified adapter position.
SmoothScrollToPosition(Int32, Int32)
Smoothly scroll to the specified adapter position.
SmoothScrollToPositionFromTop(Int32, Int32)
Smoothly scroll to the specified adapter position.
SmoothScrollToPositionFromTop(Int32, Int32, Int32)
Smoothly scroll to the specified adapter position.
VerifyDrawable(Drawable) : Boolean
If your view subclass is displaying its own Drawable objects, it should override this function and return true for any Drawable it is displaying.

Protected Methods

HandleDataChanged()
LayoutChildren()
Subclasses must override this method to layout their children.

Public Events