onInterceptTouchEvent never get's called




I want to make an drag&drop plugin.

I basically want to archive that by adding an overlay and add a image of the clicked view on that. That is working out just fine.

Assume this snippet:

<RadListView #row="1" rowSpan="2" [items]="items">
    <ng-template tkListItemTemplate let-item="item" let-i="index">
            <ListElement [item]="item"></ListElement>

<Overlay row="1" rowSpan="2" rows="auto, *">
    <!-- Snapshoted-selected view -->

Overlay is just an extended GridLayout, so I can inject custom/native code.

The Problem on Android is, when I do an longClick on a ListElement to add it to the overlay, RadListView steals the touches, because it still owns the touch gesture until it receives ACTION_UP.

So my Plan was to override onInterceptTouchEvent of Overlay to steal the gesture, after the long press was performed.
But this method never get’s called.

I’d consider that not as an Nativescript issue, but setting view.isUserInteractionEnabled = false; also does not interrupt the current gesture on the current view.

Is there a Workaround or even an intended way?


Can you provide some code or a playground example where we can reproduce the issue?