Package tripleplay.gesture
Class Swipe
A simple swipe gesture in a given cardinal direction. Supports 1 to 4 fingers. If greedy, will
indicate a continuous swipe. Completes if: one of the fingers stops moving or is removed from the
display. Cancels if an additional finger is added to the display or one of the fingers switches
directions.
-
Nested Class Summary
Nested classes/interfaces inherited from interface tripleplay.gesture.Gesture
Gesture.Direction, Gesture.State
-
Constructor Summary
ConstructorDescriptionSwipe
(int touches, Gesture.Direction direction) Swipe
(Gesture.Direction direction) -
Method Summary
Modifier and TypeMethodDescriptionaxisSwipe
(boolean value) An axis Swipe will consider any movement along the axis of its configured direction to be valid, rather than only movement in the direction itself.cancelOnPause
(boolean value) If true (the default) a pause counts the same as a finger lifted from the display.offAxisTolerance
(int pixels) A swipe is not qualified if the user moves outside of a region defined by lines that are parallel to the line that goes through the start touch point along the direction axis.onAxisThreshold
(int pixels) The distance on the Swipe's Direction axis that a touch must move to qualify the Swipe for completion.
-
Constructor Details
-
Swipe
-
Swipe
-
-
Method Details
-
cancelOnPause
If true (the default) a pause counts the same as a finger lifted from the display. -
offAxisTolerance
A swipe is not qualified if the user moves outside of a region defined by lines that are parallel to the line that goes through the start touch point along the direction axis. offAxisTolerance is the distance away from that defining line that the parallel boundaries sit. The default is 10 pixels. If you want the user to have more freedom in how finely defined their swipes are, make the tolerance large. -
onAxisThreshold
The distance on the Swipe's Direction axis that a touch must move to qualify the Swipe for completion. -
axisSwipe
An axis Swipe will consider any movement along the axis of its configured direction to be valid, rather than only movement in the direction itself.
-