FreeRDP
com.freerdp.freerdpcore.utils.GestureDetector Class Reference

Data Structures

interface  OnDoubleTapListener
 
interface  OnGestureListener
 
class  SimpleOnGestureListener
 

Public Member Functions

 GestureDetector (Context context, OnGestureListener listener)
 
 GestureDetector (Context context, OnGestureListener listener, Handler handler)
 
 GestureDetector (Context context, OnGestureListener listener, Handler handler, boolean ignoreMultitouch)
 
void setOnDoubleTapListener (OnDoubleTapListener onDoubleTapListener)
 
void setIsLongpressEnabled (boolean isLongpressEnabled)
 
boolean isLongpressEnabled ()
 
void setLongPressTimeout (int timeout)
 
boolean onTouchEvent (MotionEvent ev)
 

Constructor & Destructor Documentation

◆ GestureDetector() [1/3]

com.freerdp.freerdpcore.utils.GestureDetector.GestureDetector ( Context  context,
OnGestureListener  listener 
)
inline

Creates a GestureDetector with the supplied listener. You may only use this constructor from a UI thread (this is the usual situation).

Parameters
contextthe application's context
listenerthe listener invoked for all the callbacks, this must not be null.
Exceptions
NullPointerExceptionif
listener
is null.
See also
android.os.Handler::Handler()

◆ GestureDetector() [2/3]

com.freerdp.freerdpcore.utils.GestureDetector.GestureDetector ( Context  context,
OnGestureListener  listener,
Handler  handler 
)
inline

Creates a GestureDetector with the supplied listener. You may only use this constructor from a UI thread (this is the usual situation).

Parameters
contextthe application's context
listenerthe listener invoked for all the callbacks, this must not be null.
handlerthe handler to use
Exceptions
NullPointerExceptionif
listener
is null.
See also
android.os.Handler::Handler()

◆ GestureDetector() [3/3]

com.freerdp.freerdpcore.utils.GestureDetector.GestureDetector ( Context  context,
OnGestureListener  listener,
Handler  handler,
boolean  ignoreMultitouch 
)
inline

Creates a GestureDetector with the supplied listener. You may only use this constructor from a UI thread (this is the usual situation).

Parameters
contextthe application's context
listenerthe listener invoked for all the callbacks, this must not be null.
handlerthe handler to use
ignoreMultitouchwhether events involving more than one pointer should be ignored.
Exceptions
NullPointerExceptionif
listener
is null.
See also
android.os.Handler::Handler()
Here is the call graph for this function:

Member Function Documentation

◆ isLongpressEnabled()

boolean com.freerdp.freerdpcore.utils.GestureDetector.isLongpressEnabled ( )
inline
Returns
true if longpress is enabled, else false.
Here is the caller graph for this function:

◆ onTouchEvent()

boolean com.freerdp.freerdpcore.utils.GestureDetector.onTouchEvent ( MotionEvent  ev)
inline

Analyzes the given motion event and if applicable triggers the appropriate callbacks on the OnGestureListener supplied.

Parameters
evThe current motion event.
Returns
true if the OnGestureListener consumed the event, else false.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setIsLongpressEnabled()

void com.freerdp.freerdpcore.utils.GestureDetector.setIsLongpressEnabled ( boolean  isLongpressEnabled)
inline

Set whether longpress is enabled, if this is enabled when a user presses and holds down you get a longpress event and nothing further. If it's disabled the user can press and hold down and then later moved their finger and you will get scroll events. By default longpress is enabled.

Parameters
isLongpressEnabledwhether longpress should be enabled.
Here is the call graph for this function:

◆ setLongPressTimeout()

void com.freerdp.freerdpcore.utils.GestureDetector.setLongPressTimeout ( int  timeout)
inline

◆ setOnDoubleTapListener()

void com.freerdp.freerdpcore.utils.GestureDetector.setOnDoubleTapListener ( OnDoubleTapListener  onDoubleTapListener)
inline

Sets the listener which will be called for double-tap and related gestures.

Parameters
onDoubleTapListenerthe listener invoked for all the callbacks, or null to stop listening for double-tap gestures.
Here is the caller graph for this function:

The documentation for this class was generated from the following file: