Partager via


AbsListView.SmoothScrollToPositionFromTop Method

Definition

Overloads

SmoothScrollToPositionFromTop(Int32, Int32)

Smoothly scroll to the specified adapter position.

SmoothScrollToPositionFromTop(Int32, Int32, Int32)

Smoothly scroll to the specified adapter position.

SmoothScrollToPositionFromTop(Int32, Int32)

Smoothly scroll to the specified adapter position.

[Android.Runtime.Register("smoothScrollToPositionFromTop", "(II)V", "GetSmoothScrollToPositionFromTop_IIHandler")]
public virtual void SmoothScrollToPositionFromTop (int position, int offset);
[<Android.Runtime.Register("smoothScrollToPositionFromTop", "(II)V", "GetSmoothScrollToPositionFromTop_IIHandler")>]
abstract member SmoothScrollToPositionFromTop : int * int -> unit
override this.SmoothScrollToPositionFromTop : int * int -> unit

Parameters

position
Int32

Position to scroll to

offset
Int32

Desired distance in pixels of position from the top of the view when scrolling is finished

Attributes

Remarks

Smoothly scroll to the specified adapter position. The view will scroll such that the indicated position is displayed offset pixels below the top edge of the view. If this is impossible, (e.g. the offset would scroll the first or last item beyond the boundaries of the list) it will get as close as possible.

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

SmoothScrollToPositionFromTop(Int32, Int32, Int32)

Smoothly scroll to the specified adapter position.

[Android.Runtime.Register("smoothScrollToPositionFromTop", "(III)V", "GetSmoothScrollToPositionFromTop_IIIHandler")]
public virtual void SmoothScrollToPositionFromTop (int position, int offset, int duration);
[<Android.Runtime.Register("smoothScrollToPositionFromTop", "(III)V", "GetSmoothScrollToPositionFromTop_IIIHandler")>]
abstract member SmoothScrollToPositionFromTop : int * int * int -> unit
override this.SmoothScrollToPositionFromTop : int * int * int -> unit

Parameters

position
Int32

Position to scroll to

offset
Int32

Desired distance in pixels of position from the top of the view when scrolling is finished

duration
Int32

Number of milliseconds to use for the scroll

Attributes

Remarks

Smoothly scroll to the specified adapter position. The view will scroll such that the indicated position is displayed offset pixels below the top edge of the view. If this is impossible, (e.g. the offset would scroll the first or last item beyond the boundaries of the list) it will get as close as possible. The scroll will take duration milliseconds to complete.

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