IT. Expert System.

Android Reference

MotionEvent.PointerCoords


android.view

Class MotionEvent.PointerCoords

  • Enclosing class:
    MotionEvent


    public static final class MotionEvent.PointerCoords
    extends Object
    Transfer object for pointer coordinates. Objects of this type can be used to specify the pointer coordinates when creating new MotionEvent objects and to query pointer coordinates in bulk. Refer to InputDevice for information about how different kinds of input devices and sources represent pointer coordinates.
    • Field Summary

      Fields
      Modifier and Type Field and Description
      float orientation
      The orientation of the touch area and tool area in radians clockwise from vertical.
      float pressure
      A normalized value that describes the pressure applied to the device by a finger or other tool.
      float size
      A normalized value that describes the approximate size of the pointer touch area in relation to the maximum detectable size of the device.
      float toolMajor
      The length of the major axis of an ellipse that describes the size of the approaching tool.
      float toolMinor
      The length of the minor axis of an ellipse that describes the size of the approaching tool.
      float touchMajor
      The length of the major axis of an ellipse that describes the touch area at the point of contact.
      float touchMinor
      The length of the minor axis of an ellipse that describes the touch area at the point of contact.
      float x
      The X component of the pointer movement.
      float y
      The Y component of the pointer movement.
    • Field Detail

      • pressure

        public float pressure
        A normalized value that describes the pressure applied to the device by a finger or other tool. The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure), although values higher than 1 may be generated depending on the calibration of the input device.
        See Also:
        MotionEvent.AXIS_PRESSURE
      • size

        public float size
        A normalized value that describes the approximate size of the pointer touch area in relation to the maximum detectable size of the device. It represents some approximation of the area of the screen being pressed; the actual value in pixels corresponding to the touch is normalized with the device specific range of values and scaled to a value between 0 and 1. The value of size can be used to determine fat touch events.
        See Also:
        MotionEvent.AXIS_SIZE
      • touchMajor

        public float touchMajor
        The length of the major axis of an ellipse that describes the touch area at the point of contact. If the device is a touch screen, the length is reported in pixels, otherwise it is reported in device-specific units.
        See Also:
        MotionEvent.AXIS_TOUCH_MAJOR
      • touchMinor

        public float touchMinor
        The length of the minor axis of an ellipse that describes the touch area at the point of contact. If the device is a touch screen, the length is reported in pixels, otherwise it is reported in device-specific units.
        See Also:
        MotionEvent.AXIS_TOUCH_MINOR
      • toolMajor

        public float toolMajor
        The length of the major axis of an ellipse that describes the size of the approaching tool. The tool area represents the estimated size of the finger or pen that is touching the device independent of its actual touch area at the point of contact. If the device is a touch screen, the length is reported in pixels, otherwise it is reported in device-specific units.
        See Also:
        MotionEvent.AXIS_TOOL_MAJOR
      • toolMinor

        public float toolMinor
        The length of the minor axis of an ellipse that describes the size of the approaching tool. The tool area represents the estimated size of the finger or pen that is touching the device independent of its actual touch area at the point of contact. If the device is a touch screen, the length is reported in pixels, otherwise it is reported in device-specific units.
        See Also:
        MotionEvent.AXIS_TOOL_MINOR
      • orientation

        public float orientation
        The orientation of the touch area and tool area in radians clockwise from vertical. An angle of 0 radians indicates that the major axis of contact is oriented upwards, is perfectly circular or is of unknown orientation. A positive angle indicates that the major axis of contact is oriented to the right. A negative angle indicates that the major axis of contact is oriented to the left. The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians (finger pointing fully right).
        See Also:
        MotionEvent.AXIS_ORIENTATION
    • Constructor Detail

      • MotionEvent.PointerCoords

        public MotionEvent.PointerCoords()
        Creates a pointer coords object with all axes initialized to zero.
      • MotionEvent.PointerCoords

        public MotionEvent.PointerCoords(MotionEvent.PointerCoords other)
        Creates a pointer coords object as a copy of the contents of another pointer coords object.
        Parameters:
        other - The pointer coords object to copy.
    • Method Detail

      • clear

        public void clear()
        Clears the contents of this object. Resets all axes to zero.
      • copyFrom

        public void copyFrom(MotionEvent.PointerCoords other)
        Copies the contents of another pointer coords object.
        Parameters:
        other - The pointer coords object to copy.
      • getAxisValue

        public float getAxisValue(int axis)
        Gets the value associated with the specified axis.
        Parameters:
        axis - The axis identifier for the axis value to retrieve.
        Returns:
        The value associated with the axis, or 0 if none.
        See Also:
        MotionEvent.AXIS_X, MotionEvent.AXIS_Y
      • setAxisValue

        public void setAxisValue(int axis,
                        float value)
        Sets the value associated with the specified axis.
        Parameters:
        axis - The axis identifier for the axis value to assign.
        value - The value to set.
        See Also:
        MotionEvent.AXIS_X, MotionEvent.AXIS_Y


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 753 / 158767213. Delta: 0.04186 с