語言

ListFragment.SetSelection(Int32) 方法

定義

將目前選取的清單項目與適配器資料設定到指定位置

[Android.Runtime.Register("setSelection", "(I)V", "GetSetSelection_IHandler")]
public virtual void SetSelection(int position);
[<Android.Runtime.Register("setSelection", "(I)V", "GetSetSelection_IHandler")>]
abstract member SetSelection : int -> unit
override this.SetSelection : int -> unit

參數

position
Int32

位置

屬性

備註

將目前選取的清單項目與適配器資料設定到指定位置

本頁內容與程式碼範例受內容授權條款所規範。 Java 和 OpenJDK 是 Oracle 和/或其關係企業的商標或注冊商標。

最後更新於 2026-08-03 UTC。

Android 參考資料。android.app.ListFragment.setSelection

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

適用於