public final class Touch
extends java.lang.Object
touches field of an Event or TouchEvent.TouchEvent,
Sample code and further information| Modifier and Type | Field and Description |
|---|---|
long |
id
The unique identity of the touch.
|
boolean |
primary
A flag indicating that the touch is the first touch from a previous
state of no touch points.
|
TouchSource |
source
The object representing the input source that generated the touch.
|
int |
state
The state of this touch at the time it was generated.
|
int |
x
The x location of the touch in TouchSource coordinates.
|
int |
y
The y location of the touch in TouchSource coordinates.
|
| Constructor and Description |
|---|
Touch(long identity,
TouchSource source,
int state,
boolean primary,
int x,
int y)
Constructs a new touch state from the given inputs.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
toString()
Returns a string containing a concise, human-readable
description of the receiver.
|
public long id
public TouchSource source
public int state
TouchEvent was generated.public boolean primary
public int x
public int y
Touch(long identity,
TouchSource source,
int state,
boolean primary,
int x,
int y)
identity - Identity of the touchsource - Object representing the device that generated the touchstate - One of the state constants representing the state of this touchprimary - Whether or not the touch is the primary touchx - X location of the touch in screen coordinatesy - Y location of the touch in screen coordinates