Skip to content

Class TouchInput

Il Kadyrov edited this page Nov 3, 2020 · 1 revision

TouchInput class is used for interacting with user's gestures and touches to the LocationView.

Referenced from: LocationView.

Gestures enum elements

  • TAP - single tap on the screen;
  • DOUBLE_TAP - double tap on the screen;
  • LONG_PRESS - long press on the screen;
  • PAN - scrolling on the screen;
  • SCALE - zooming in and out on the screen.

Public methods

Function setGestureEnabled

public void setGestureEnabled(Gestures gesture)

Function is used for enabling gesture.

Parameters
  • gesture — Gestures enum element.

Function setGestureDisabled

public void setGestureDisabled(Gestures gesture)

Function is used for disabling gesture.

Parameters
  • gesture — Gestures enum element.

Function isGestureEnabled

public boolean isGestureEnabled(TouchInput.Gestures g)

Function returns true if gesture is enabled.

Parameters
  • gesture — Gestures enum element.

Function setAllGesturesEnabled

public void setAllGesturesEnabled()

Function sets all the gestures enabled.

Function setAllGesturesDisabled

public void setAllGesturesDisabled()

Function sets all the gestures disabled.

Function setTapResponder

public void setTapResponder(TouchInput.TapResponder responder)

Function is used for setting your custom released TouchInput.TapResponder interface.

Parameters

Function setDoubleTapResponder

public void setDoubleTapResponder(TouchInput.DoubleTapResponder responder)

Function is used for setting your custom released TouchInput.DoubleTapResponder interface.

Parameters

Function setLongPressResponder

public void setLongPressResponder(TouchInput.LongPressResponder responder)

Function is used for setting your custom released TouchInput.LongPressResponder interface.

Parameters

Function setPanResponder

public void setPanResponder(TouchInput.PanResponder responder)

Function is used for setting your custom released TouchInput.PanResponder interface.

Parameters

Function setScaleResponder

public void setScaleResponder(TouchInput.ScaleResponder responder)

Function is used for setting your custom released TouchInput.ScaleResponder interface.

Parameters

Function setSimultaneousDetectionEnabled

public void setSimultaneousDetectionEnabled(TouchInput.Gestures first, TouchInput.Gestures second)

Function is used for enabling simultaneous detection of two gestures. For example pan and scale.

Parameters
  • first — Gestures enum element.
  • second — Gestures enum element.

Function setSimultaneousDetectionDisabled

public void setSimultaneousDetectionDisabled(TouchInput.Gestures first, TouchInput.Gestures second)

Function is used for disabling simultaneous detection of two gestures. For example pan and scale.

Parameters
  • first — Gestures enum element.
  • second — Gestures enum element.

Function isSimultaneousDetectionAllowed

public void isSimultaneousDetectionAllowed(TouchInput.Gestures first, TouchInput.Gestures second)

Function is used for checking that simultaneous detection of two gestures allowed. For example pan and scale.

Parameters
  • first — Gestures enum element.
  • second — Gestures enum element.

Clone this wiki locally