NativeScript点击&长按在一起无法正常工作 [英] NativeScript tap & longPress together not working

查看:74
本文介绍了NativeScript点击&长按在一起无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在longPress事件上,tap事件也将执行

On longPress event the tap event also executing

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

是否可以防止在longPress上点击? 我想在相同的布局上处理两个事件. 在ListView中,我们只有"itemTap",是否有"longPress"选项? 请不要建议我RadListView.

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.

推荐答案

也许这个答案还是有帮助的.存在与您的问题有关的问题:

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

在第一个中,描述了如何手动修复它.在第二篇文章中,一名贡献者表示,他们将尝试在3.1版中对其进行修复.

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.

这篇关于NativeScript点击&amp;长按在一起无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆