Class PlaneGestureDetector
- java.lang.Object
-
- com.avaya.clientservices.media.gui.PlaneGestureDetector
-
-
Constructor Summary
Constructors Constructor Description PlaneGestureDetector(android.content.Context context, PlaneGestureListener listener)
PlaneGestureDetector constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isLongpressEnabled()
boolean
onDown(android.view.MotionEvent e)
boolean
onFling(android.view.MotionEvent e1, android.view.MotionEvent e2, float velocityX, float velocityY)
void
onLongPress(android.view.MotionEvent e)
boolean
onScroll(android.view.MotionEvent e1, android.view.MotionEvent e2, float distanceX, float distanceY)
void
onShowPress(android.view.MotionEvent e)
boolean
onSingleTapUp(android.view.MotionEvent e)
boolean
onTouchEvent(double time, android.view.MotionEvent event, int surfaceHeight)
Analyzes the given motion event and if applicable triggers the appropriate callbacks on thePlaneGestureListener
supplied.void
setIsLongpressEnabled(boolean isLongpressEnabled)
Set whether longpress is enabled, if this is enabled when a user presses and holds down you get a longpress event and nothing further.
-
-
-
Constructor Detail
-
PlaneGestureDetector
public PlaneGestureDetector(android.content.Context context, PlaneGestureListener listener)
PlaneGestureDetector constructor.- Parameters:
context
- the contextlistener
- the listener for gesture events
-
-
Method Detail
-
setIsLongpressEnabled
public void setIsLongpressEnabled(boolean isLongpressEnabled)
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:
isLongpressEnabled
- whether longpress should be enabled.
-
isLongpressEnabled
public boolean isLongpressEnabled()
- Returns:
- true if longpress is enabled, else false.
-
onTouchEvent
public boolean onTouchEvent(double time, android.view.MotionEvent event, int surfaceHeight)
Analyzes the given motion event and if applicable triggers the appropriate callbacks on thePlaneGestureListener
supplied.- Specified by:
onTouchEvent
in interfaceTouchable
- Parameters:
event
- the current motion event.- Returns:
- true if the
PlaneGestureListener
consumed the event, otherwise false.
-
onDown
public boolean onDown(android.view.MotionEvent e)
- Specified by:
onDown
in interfaceandroid.view.GestureDetector.OnGestureListener
-
onShowPress
public void onShowPress(android.view.MotionEvent e)
- Specified by:
onShowPress
in interfaceandroid.view.GestureDetector.OnGestureListener
-
onSingleTapUp
public boolean onSingleTapUp(android.view.MotionEvent e)
- Specified by:
onSingleTapUp
in interfaceandroid.view.GestureDetector.OnGestureListener
-
onScroll
public boolean onScroll(android.view.MotionEvent e1, android.view.MotionEvent e2, float distanceX, float distanceY)
- Specified by:
onScroll
in interfaceandroid.view.GestureDetector.OnGestureListener
-
onLongPress
public void onLongPress(android.view.MotionEvent e)
- Specified by:
onLongPress
in interfaceandroid.view.GestureDetector.OnGestureListener
-
onFling
public boolean onFling(android.view.MotionEvent e1, android.view.MotionEvent e2, float velocityX, float velocityY)
- Specified by:
onFling
in interfaceandroid.view.GestureDetector.OnGestureListener
-
-