Language

PointerCaptureMode Enum

Definition

public enum PointerCaptureMode
type PointerCaptureMode = 
Inheritance
PointerCaptureMode

Fields

Name Value Description
Uncaptured 0

A "pointer capture mode" in which the pointer is not captured.

Passing this to requestPointerCapture(int) is equivalent to calling releasePointerCapture().

Android reference for android.view.View.POINTER_CAPTURE_MODE_UNCAPTURED.

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.

Absolute 1

A pointer capture mode in which touchpads report absolute finger locations.

In this capture mode, no attempt is made to recognize gestures from touchpad input. Instead, the absolute location of each touch on the pad is reported directly to the View, in the same way that other touches on devices with InputDevice.SOURCE_CLASS_POINTER are reported.

Events will be delivered with the source InputDevice.SOURCE_TOUCHPAD. The absolute position of each touch will be available through MotionEvent.getX(int) and MotionEvent.getY(int), and their relative movements through MotionEvent.AXIS_RELATIVE_X and MotionEvent.AXIS_RELATIVE_Y. If the touchpad supports them, touch dimension information may be available through the MotionEvent.AXIS_PRESSURE, MotionEvent.AXIS_TOUCH_MAJOR, MotionEvent.AXIS_TOUCH_MINOR, MotionEvent.AXIS_TOOL_MAJOR, MotionEvent.AXIS_TOOL_MINOR, and MotionEvent.AXIS_ORIENTATION axes.

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

Android reference for android.view.View.POINTER_CAPTURE_MODE_ABSOLUTE.

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.

Relative 2

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