Partager via


IScrollFeedbackProvider.OnScrollProgress(Int32, Int32, Int32, Int32) Method

Definition

Call this when the view has scrolled.

[Android.Runtime.Register("onScrollProgress", "(IIII)V", "GetOnScrollProgress_IIIIHandler:Android.Views.IScrollFeedbackProviderInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)]
public void OnScrollProgress (int inputDeviceId, int source, int axis, int deltaInPixels);
[<Android.Runtime.Register("onScrollProgress", "(IIII)V", "GetOnScrollProgress_IIIIHandler:Android.Views.IScrollFeedbackProviderInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)>]
abstract member OnScrollProgress : int * int * int * int -> unit

Parameters

inputDeviceId
Int32

the ID of the InputDevice that caused scroll progress.

source
Int32

the input source of the motion that caused scroll progress.

axis
Int32

the axis of event that caused scroll progress.

deltaInPixels
Int32

the amount of scroll progress, in pixels.

Attributes

Remarks

Call this when the view has scrolled.

Different axes have different ways to map their raw axis values to pixels for scrolling. When calling this method, use the scroll values in pixels by which the view was scrolled; do not use the raw axis values. That is, use whatever value is passed to one of View's scrolling methods (example: View#scrollBy(int, int)). For example, for vertical scrolling on MotionEvent#AXIS_SCROLL, convert the raw axis value to the equivalent pixels by using ViewConfiguration#getScaledVerticalScrollFactor(), and use that value for this method call.

Note that a feedback may not be provided on every call to this method. This interface, for instance, may provide feedback for every `x` pixels scrolled. For the interface to properly track scroll progress and provide feedback when needed, call this method for each scroll event that you want to be accounted to scroll feedback.

Java documentation for android.view.ScrollFeedbackProvider.onScrollProgress(int, 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