本文介绍了NativeScript Tap &长按在一起不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 longPress 事件中,tap 事件也执行

On longPress event the tap event also executing

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

有没有办法防止点击长按?我想在相同的布局上处理这两个事件.在 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:

在第一个中,描述了如何手动修复它.在第二个中,一位贡献者表示他们将尝试在 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 Tap &amp;长按在一起不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 01:59