Język

View.PointerCaptureModeRelative Field

Definition

Caution

This constant will be removed in the future version. Use Android.Views.PointerCaptureMode enum directly instead of this field.

A pointer capture mode in which touchpad gestures are recognized and reported like mouse movements.

[Android.Runtime.Register("POINTER_CAPTURE_MODE_RELATIVE", ApiSince=37)]
[System.Obsolete("This constant will be removed in the future version. Use Android.Views.PointerCaptureMode enum directly instead of this field.", true)]
public const Android.Views.PointerCaptureMode PointerCaptureModeRelative = 2;
[<Android.Runtime.Register("POINTER_CAPTURE_MODE_RELATIVE", ApiSince=37)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Views.PointerCaptureMode enum directly instead of this field.", true)>]
val mutable PointerCaptureModeRelative : Android.Views.PointerCaptureMode

Field Value

Value = 2
Attributes

Remarks

A pointer capture mode in which touchpad gestures are recognized and reported like mouse movements.

In this capture mode, the following gestures made on a captured touchpad will be recognized and reported: Pointer movement gestures (such as moving a single finger on the pad) will be reported like mouse movements, with the MotionEvent.ACTION_MOVE action and their relative position changes available through MotionEvent.getX and MotionEvent.getY; Scrolling gestures (such as two-finger swipes) will be reported like scroll wheel movements on a mouse, with the MotionEvent.ACTION_SCROLL action and the scroll amounts available through the MotionEvent.AXIS_VSCROLL and MotionEvent.AXIS_HSCROLL axes.

Motion values are proportional to the physical motion of the gesturing finger(s), and the physical movement in mm can be found using the resolution reported by InputDevice.MotionRange.getResolution for the relevant axis.

These events will be reported with InputDevice.SOURCE_MOUSE_RELATIVE.

Events from mice are always reported in the same way regardless of capture mode.

Android reference for android.view.View.POINTER_CAPTURE_MODE_RELATIVE.

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