다음을 통해 공유


IScrollFeedbackProvider Interface

Definition

Provides feedback to the user for scroll events on a View.

[Android.Runtime.Register("android/view/ScrollFeedbackProvider", "", "Android.Views.IScrollFeedbackProviderInvoker", ApiSince=35)]
public interface IScrollFeedbackProvider : Android.Runtime.IJavaObject, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/view/ScrollFeedbackProvider", "", "Android.Views.IScrollFeedbackProviderInvoker", ApiSince=35)>]
type IScrollFeedbackProvider = interface
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Attributes
Implements

Remarks

Provides feedback to the user for scroll events on a View. The type of feedback provided to the user may depend on the InputDevice that generated the scroll events.

An example of the type of feedback that this interface may provide is haptic feedback (that is, tactile feedback that provide the user physical feedback for their scroll).

The interface provides methods for the client to report different scroll events. The client should report all scroll events that they want to be considered for scroll feedback using the respective methods. The interface will process these events and provide scroll feedback based on its specific feedback implementation.

<h3>Obtaining the correct arguments for methods in this interface</h3>

Methods in this interface rely on the provision of valid InputDevice ID and source, as well as the MotionEvent axis that generated a specific scroll event. The InputDevice represented by the provided ID must have a InputDevice.MotionRange with the provided source and axis. See below for more details on obtaining the right arguments for your method call.

<ul>

<li>

<b>inputDeviceId</b>: should always be the ID of the InputDevice that generated the scroll event. If calling this method in response to a MotionEvent, use the device ID that is reported by the event, which can be obtained using MotionEvent#getDeviceId(). Otherwise, use a valid ID that is obtained from InputDevice#getId(), or from an android.hardware.input.InputManager instance (android.hardware.input.InputManager#getInputDeviceIds() gives all the valid input device IDs).

<li>

<b>source</b>: should always be the InputDevice source that generated the scroll event. Use MotionEvent#getSource() if calling this method in response to a MotionEvent. Otherwise, use a valid source for the InputDevice. You can use InputDevice#getMotionRanges() to get all the InputDevice.MotionRanges for the InputDevice, from which you can derive all the valid sources for the device.

<li>

<b>axis</b>: should always be the axis whose axis value produced the scroll event. A MotionEvent may report data for multiple axes, and each axis may have multiple data points for different pointers. Use the axis whose movement produced the specific scroll event. The motion value for an axis can be obtained using MotionEvent#getAxisValue(int). You can use InputDevice#getMotionRanges() to get all the InputDevice.MotionRanges for the InputDevice, from which you can derive all the valid axes for the device.

</ul>

<b>Note</b> that not all valid input device source and motion axis inputs are necessarily supported for scroll feedback; the implementation may choose to provide no feedback for some valid input device source and motion axis arguments.

Java documentation for android.view.ScrollFeedbackProvider.

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.

Properties

Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)

Methods

CreateProvider(View)

Creates a ScrollFeedbackProvider implementation for this device.

Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
OnScrollLimit(Int32, Int32, Int32, Boolean)

Call this when the view has reached the scroll limit.

OnScrollProgress(Int32, Int32, Int32, Int32)

Call this when the view has scrolled.

OnSnapToItem(Int32, Int32, Int32)

Call this when the view has snapped to an item.

SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Gets the JNI name of the type of the instance self.

JavaAs<TResult>(IJavaPeerable)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

TryJavaCast<TResult>(IJavaPeerable, TResult)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

Applies to