| title | GesturesObserver |
|---|---|
| titleTemplate | title - API / NativeScript |
| description | Provides options for the GesturesObserver. |
| contributors | false |
Defined in: ui/gestures/index.d.ts:11
Provides options for the GesturesObserver.
new GesturesObserver(
target: View,
callback: (args: GestureEventData) => void,
context: any): GesturesObserver;Defined in: ui/gestures/index.d.ts:18
Creates an instance of GesturesObserver class.
| Parameter | Type | Description |
|---|---|---|
target |
View |
The view for which the observer is created. |
callback |
(args: GestureEventData) => void |
A function that will be executed when a gesture is received. |
context |
any |
default this argument for the callbacks. |
GesturesObserver
androidOnTouchEvent: (motionEvent: any) => void;Defined in: ui/gestures/index.d.ts:51
An internal Android specific method used to pass the motion event to the correct gesture observer.
| Parameter | Type |
|---|---|
motionEvent |
any |
void
callback: (args: GestureEventData) => void;Defined in: ui/gestures/index.d.ts:41
A function that will be executed when a gesture is received.
| Parameter | Type |
|---|---|
args |
GestureEventData |
void
context: any;Defined in: ui/gestures/index.d.ts:46
A context which will be used as this in callback execution.
type: GestureTypes;Defined in: ui/gestures/index.d.ts:36
Singular gesture type (e.g. GestureTypes.tap) attached to the observer. Does not support plural gesture types (e.g. GestureTypes.tap & GestureTypes.doubleTap).
disconnect(): any;Defined in: ui/gestures/index.d.ts:29
Disconnects the gesture observer.
any
observe(type: GestureTypes): any;Defined in: ui/gestures/index.d.ts:24
Registers a gesture observer to a view and gesture.
| Parameter | Type | Description |
|---|---|---|
type |
GestureTypes |
Type of the gesture. |
any