Compartilhar via


AbsListView.SetSelectionFromTop(Int32, Int32) Method

Definition

Sets the selected item and positions the selection y pixels from the top edge of the ListView.

[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

Parameters

position
Int32

Index (starting at 0) of the data item to be selected.

y
Int32

The distance from the top edge of the ListView (plus padding) that the item will be positioned.

Attributes

Remarks

Sets the selected item and positions the selection y pixels from the top edge of the ListView. (If in touch mode, the item will not be selected but it will still be positioned appropriately.)

Java documentation for android.widget.AbsListView.setSelectionFromTop(int, 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.

Applies to