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 booleanisLongpressEnabled()booleanonDown(android.view.MotionEvent e)booleanonFling(android.view.MotionEvent e1, android.view.MotionEvent e2, float velocityX, float velocityY)voidonLongPress(android.view.MotionEvent e)booleanonScroll(android.view.MotionEvent e1, android.view.MotionEvent e2, float distanceX, float distanceY)voidonShowPress(android.view.MotionEvent e)booleanonSingleTapUp(android.view.MotionEvent e)booleanonTouchEvent(double time, android.view.MotionEvent event, int surfaceHeight)Analyzes the given motion event and if applicable triggers the appropriate callbacks on thePlaneGestureListenersupplied.voidsetIsLongpressEnabled(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 thePlaneGestureListenersupplied.- Specified by:
onTouchEventin interfaceTouchable- Parameters:
event- the current motion event.- Returns:
- true if the
PlaneGestureListenerconsumed the event, otherwise false.
-
onDown
public boolean onDown(android.view.MotionEvent e)
- Specified by:
onDownin interfaceandroid.view.GestureDetector.OnGestureListener
-
onShowPress
public void onShowPress(android.view.MotionEvent e)
- Specified by:
onShowPressin interfaceandroid.view.GestureDetector.OnGestureListener
-
onSingleTapUp
public boolean onSingleTapUp(android.view.MotionEvent e)
- Specified by:
onSingleTapUpin interfaceandroid.view.GestureDetector.OnGestureListener
-
onScroll
public boolean onScroll(android.view.MotionEvent e1, android.view.MotionEvent e2, float distanceX, float distanceY)- Specified by:
onScrollin interfaceandroid.view.GestureDetector.OnGestureListener
-
onLongPress
public void onLongPress(android.view.MotionEvent e)
- Specified by:
onLongPressin interfaceandroid.view.GestureDetector.OnGestureListener
-
onFling
public boolean onFling(android.view.MotionEvent e1, android.view.MotionEvent e2, float velocityX, float velocityY)- Specified by:
onFlingin interfaceandroid.view.GestureDetector.OnGestureListener
-
-