NativeScript tap & longPress together not working

為{幸葍}努か 提交于 2019-12-12 03:36:05

问题


On longPress event the tap event also executing

<StackLayout (longPress)="onLongPressItem(item)" (tap)="onItemTap(item)">...</StackLayout>

is there a way to prevent tap on longPress? I want to work both events on Same layout. In ListView we have 'itemTap' only is there a option for 'longPress'? Please don't suggest me RadListView.


回答1:


Maybe this answer is still helpful too. There exists issues concerning your problem:

  • https://github.com/NativeScript/NativeScript/issues/2823
  • https://github.com/NativeScript/NativeScript/issues/2977

In the first one, it is described how to manually fix it. In the second one, a contributor said that they will attempt to fix it in version 3.1.



来源:https://stackoverflow.com/questions/42228969/nativescript-tap-longpress-together-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!