Lingua

ListFragment.SetSelection(Int32) Method

Definition

Set the currently selected list item to the specified position with the adapter's data

[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

Parameters

position
Int32

position

Attributes

Remarks

Set the currently selected list item to the specified position with the adapter's data

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-08-03 UTC.

Android reference for android.app.ListFragment.setSelection.

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.

Applies to