ISectionIndexer.GetSectionForPosition(Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
給定介面卡中的位置, 會回傳該區段在區段物件陣列中的索引。
[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
參數
- position
- Int32
在適配器中回傳對應區段索引的位置
傳回
該區段在區段物件陣列中對應區段的索引,且受限於陣列範圍內
- 屬性
備註
給定介面卡中的位置, 會回傳該區段在區段物件陣列中的索引。
若區段索引超出區段陣列範圍,則必須裁剪該索引以符合區段陣列大小。
例如,考慮一個索引器,其中陣列索引為0的區段從適配器位置100開始。 呼叫此方法時位置為 10,位於第一段之前,必須回傳索引 0。
Java 文件 android.widget.SectionIndexer.getSectionForPosition(int)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。