onTouch(Action As Int, X As Float, Y As Float, MotionEvent As Object) As Boolean onPointerDown(ptrIndex As Int, PID As Int, MotionEvent As Object) onPointerUp(ptrIndex As Int, PID As Int, MotionEvent As Object) onDown(X As Float, Y As Float, MotionEvent As Object) onSingleTapUp(X As Float, Y As Float, MotionEvent As Object) onSingleTapConfirmed(X As Float, Y As Float, MotionEvent As Object) onDoubleTap(X As Float, Y As Float, MotionEvent As Object) onShowPress(X As Float, Y As Float, MotionEvent As Object) onLongPress(X As Float, Y As Float, MotionEvent As Object) onScroll(distanceX As Float, distanceY As Float, MotionEvent1 As Object, MotionEvent2 As Object) onFling(velocityX As Float, velocityY As Float, MotionEvent1 As Object, MotionEvent2 As Object)
Sets 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 move their finger and you will get scroll events. By default longpress is enabled.
getAction (evAsandroid.view.MotionEvent) AsInt
Returns the Action value from the given MotionEvent.
Sets the listeners for the following events: onTouch: notified whenever a MotionEvent occurs. Handler: Sub MyView_onTouch(Action As Int, X As Float, Y As Float, MotionEvent As Object) As Boolean onPointerDown: notified when a non-primary pointer has gone down. Handler: Sub MyView_onPointerDown(ptrIndex As Int, PID As Int, MotionEvent As Object) onPointerUp: notified when a non-primary pointer has gone up. Handler: Sub MyView_onPointerUp(ptrIndex As Int, PID As Int, MotionEvent As Object) onDown: notified when a tap occurs with the down MotionEvent that triggered it. This will be triggered immediately for every down event. All other events should be preceded by this. Handler: Sub MyView_onDown(X As Float, Y As Float, MotionEvent As Object) onSingleTapUp: notified when a tap occurs with the up MotionEvent that triggered it. Handler: Sub MyView_onSingleTapUp(X As Float, Y As Float, MotionEvent As Object) onSingleTapConfirmed: notified when a single-tap occurs. Unlike onSingleTapUp, this will only be called after the detector is confident that the user's first tap is not followed by a second tap leading to a double-tap gesture. Handler: Sub MyView_onSingleTapConfirmed(X As Float, Y As Float, MotionEvent As Object) onDoubleTap: notified when a double-tap occurs. Handler: Sub MyView_onDoubleTap(X As Float, Y As Float, MotionEvent As Object) onShowPress: the user has performed a down MotionEvent and not performed a move or up yet. This event is commonly used to provide visual feedback to the user to let them know that their action has been recognized i.e. highlight an element. Handler: Sub MyView_onShowPress(X As Float, Y As Float, MotionEvent As Object) onLongPress: notified when a long press occurs with the initial on down MotionEvent that triggered it. Handler: Sub MyView_onLongPress(X As Float, Y As Float, MotionEvent As Object) onScroll: notified when a scroll occurs with the initial on down MotionEvent and the current move MotionEvent. The distance in x and y is also supplied. Handler: Sub MyView_onScroll(distanceX As Float, distanceY As Float, MotionEvent1 As Object, MotionEvent2 As Object) onFling: notified when a fling occurs with the initial on down MotionEvent and the matching up MotionEvent. The calculated velocity is supplied along the x and y axis in pixels per second. Handler: Sub MyView_onFling(velocityX As Float, velocityY As Float, MotionEvent1 As Object, MotionEvent2 As Object)
Top