語言

AbsListView.SetSelectionFromTop(Int32, Int32) 方法

定義

設定選取的項目,並將選取的 y 像素從列表視圖的頂端邊緣開始定位。

[Android.Runtime.Register("setSelectionFromTop", "(II)V", "GetSetSelectionFromTop_IIHandler")]
public virtual void SetSelectionFromTop(int position, int y);
[<Android.Runtime.Register("setSelectionFromTop", "(II)V", "GetSetSelectionFromTop_IIHandler")>]
abstract member SetSelectionFromTop : int * int -> unit
override this.SetSelectionFromTop : int * int -> unit

參數

position
Int32

從 0 開始的索引,指待選取的資料項目。

y
Int32

項目將被放置的位置距離列表檢視的頂端(加上填充)。

屬性

備註

設定選取的項目,並將選取的 y 像素從列表視圖的頂端邊緣開始定位。 (若處於觸控模式,該物品不會被選取,但仍會被適當擺放。)

Java 文件 android.widget.AbsListView.setSelectionFromTop(int, int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於