See Also: AlphabetIndexer
public class AlphabetIndexer : DataSetObserver, ISectionIndexer, IDisposable
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.
Your adapter is responsible for updating the cursor by calling AlphabetIndexer.SetCursor(ICursor) if the cursor changes. AlphabetIndexer.GetPositionForSection(Int32) method does the binary search for the starting index of a given section (alphabet).
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 3
The members of Android.Widget.AlphabetIndexer are listed below.
See Also: DataSetObserver
|MAlphabet||ICharSequence. The string of characters that make up the indexing sections.|
|MColumnIndex||Int32. The index of the cursor column that this list is sorted on.|
|MDataCursor||ICursor. Cursor that is used by the adapter of the list view.|
|ThresholdClass||IntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.|
|ThresholdType||Type. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.|
Performs a binary search or cache lookup to find the first row that matches a given section's starting letter.
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.
Returns the section array constructed from the alphabet provided in the constructor.
Sets a new cursor as the data set and resets the cache of indices.