public final class

TouchEvent

extends Object
java.lang.Object
   ↳ com.neomades.app.TouchEvent

Class Overview

Touch screen event generated by an end-user action.

Summary

Public Methods
int getDraggedHeight()
Returns the height of the current dragged gesture.
int getDraggedWidth()
Returns the width of the current dragged gesture.
int getPressedX()
Returns the origin X position.
int getPressedY()
Returns the origin Y position.
int getTotalHeight()
Returns the total amount of the dragged gesture.
int getTotalWidth()
Returns the total amount of the dragged gesture.
int getX()
Returns the current x
int getY()
Returns the current y
boolean isCancelled()
Returns if the touch event has been cancelled by the user, and the touch position is outside the Screen or View.
boolean isDragged()
Returns if the finger is currently dragged from the original position.
boolean isPressed()
Returns if the finger is only pressed (no drag, no release).
boolean isReleased()
Returns if the finger has been released from the screen.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public int getDraggedHeight ()

Returns the height of the current dragged gesture.

Returns
  • the height of the dragged gesture

public int getDraggedWidth ()

Returns the width of the current dragged gesture.

Returns
  • the width of the dragged gesture

public int getPressedX ()

Returns the origin X position.

Returns
  • the pressed X coordinate

public int getPressedY ()

Returns the origin Y position.

Returns
  • the pressed Y coordinate

public int getTotalHeight ()

Returns the total amount of the dragged gesture.

Returns
  • the total amount of the dragged gesture

public int getTotalWidth ()

Returns the total amount of the dragged gesture.

Returns
  • the total amount of the dragged gesture

public int getX ()

Returns the current x

Returns
  • the current x

public int getY ()

Returns the current y

Returns
  • the current y

public boolean isCancelled ()

Returns if the touch event has been cancelled by the user, and the touch position is outside the Screen or View.

Returns
  • true if the touch position is outside the view or the screen.

public boolean isDragged ()

Returns if the finger is currently dragged from the original position.

Returns
  • true if the finger has been dragged

public boolean isPressed ()

Returns if the finger is only pressed (no drag, no release).

Returns
  • true if the finger is only pressing the screen.

public boolean isReleased ()

Returns if the finger has been released from the screen.

Returns
  • if the finger has been released from the screen