ISectionIndexer.GetSectionForPosition(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Given a position within the adapter, returns the index of the corresponding section within the array of section objects.
[Android.Runtime.Register("getSectionForPosition", "(I)I", "GetGetSectionForPosition_IHandler:Android.Widget.ISectionIndexerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int GetSectionForPosition (int position);
[<Android.Runtime.Register("getSectionForPosition", "(I)I", "GetGetSectionForPosition_IHandler:Android.Widget.ISectionIndexerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetSectionForPosition : int -> int
Parameters
- position
- Int32
the position within the adapter for which to return the corresponding section index
Returns
the index of the corresponding section within the array of section objects, constrained to fall within the array bounds
- Attributes
Remarks
Given a position within the adapter, returns the index of the corresponding section within the array of section objects.
If the section index is outside of the section array bounds, the index must be clipped to fall within the size of the section array.
For example, consider an indexer where the section at array index 0 starts at adapter position 100. Calling this method with position 10, which is before the first section, must return index 0.
Java documentation for android.widget.SectionIndexer.getSectionForPosition(int)
.
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.