Class Swipe

All Implemented Interfaces:
Gesture<Swipe>

public class Swipe extends GestureBase<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.
  • Constructor Details

  • Method Details

    • cancelOnPause

      public Swipe cancelOnPause(boolean value)
      If true (the default) a pause counts the same as a finger lifted from the display.
    • offAxisTolerance

      public Swipe 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. 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

      public Swipe onAxisThreshold(int pixels)
      The distance on the Swipe's Direction axis that a touch must move to qualify the Swipe for completion.
    • axisSwipe

      public Swipe axisSwipe(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.