다음을 통해 공유


AlphabetIndexer Class

Definition

A helper class for adapters that implement the SectionIndexer interface.

[Android.Runtime.Register("android/widget/AlphabetIndexer", DoNotGenerateAcw=true)]
public class AlphabetIndexer : Android.Database.DataSetObserver, Android.Widget.ISectionIndexer, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/widget/AlphabetIndexer", DoNotGenerateAcw=true)>]
type AlphabetIndexer = class
    inherit DataSetObserver
    interface ISectionIndexer
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
AlphabetIndexer
Attributes
Implements

Remarks

A helper class for adapters that implement the SectionIndexer interface. If the items in the adapter are sorted by simple alphabet-based sorting, then this class provides a way to do fast indexing of large lists using binary search. It caches the indices that have been determined through the binary search and also invalidates the cache if changes occur in the cursor. <p/> Your adapter is responsible for updating the cursor by calling #setCursor if the cursor changes. #getPositionForSection method does the binary search for the starting index of a given section (alphabet).

Java documentation for android.widget.AlphabetIndexer.

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

AlphabetIndexer(ICursor, Int32, ICharSequence)

Constructs the indexer.

AlphabetIndexer(ICursor, Int32, String)

Constructs the indexer.

AlphabetIndexer(IntPtr, JniHandleOwnership)

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

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
MAlphabet

The string of characters that make up the indexing sections.

MColumnIndex

The index of the cursor column that this list is sorted on.

MDataCursor

Cursor that is used by the adapter of the list view.

PeerReference (Inherited from Object)
ThresholdClass

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

ThresholdType

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

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Compare(String, String)

Default implementation compares the first character of word with letter.

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetPositionForSection(Int32)

Performs a binary search or cache lookup to find the first row that matches a given section's starting letter.

GetSectionForPosition(Int32)

Returns the section index for a given position in the list by querying the item and comparing it with all items in the section array.

GetSections()

Returns the section array constructed from the alphabet provided in the constructor.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
OnChanged()

This method is called when the entire data set has changed, most likely through a call to Cursor#requery() on a Cursor.

(Inherited from DataSetObserver)
OnInvalidated()

This method is called when the entire data becomes invalid, most likely through a call to Cursor#deactivate() or Cursor#close() on a Cursor.

(Inherited from DataSetObserver)
SetCursor(ICursor)

Sets a new cursor as the data set and resets the cache of indices.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

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

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

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

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to