如何检测双触摸/水龙头在Android的ListView? [英] How to detect a double touch/taps on an Android ListView?

查看:87
本文介绍了如何检测双触摸/水龙头在Android的ListView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你知道如何检测两个触摸/水龙头上一个的ListView

Do you know about how to detect two touches/taps on a ListView?

我想有一个叫下面的方法时,2次触摸:

I am trying to have the following method called when double touched:

@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
}

在此先感谢。

Thanks in advance.

推荐答案

你为什么不使用长触摸?或者,您使用已经别的东西?在长期接触的优点双触摸:

Why aren't you using a Long Touch? Or are you using that already for something else? The advantages over a long touch over a double touch:

  • 长preSS是在UI准则特别建议的互动,双触摸没有。
  • 这就是用户所期望的;用户可能无法找到一个双触摸动作,因为他们不会去寻找它
  • 在它已经<一个href="http://developer.android.com/reference/android/widget/AdapterView.OnItemLongClickListener.html"相对=nofollow>在API 处理。
  • Long Press is a recommeded interaction in the UI Guidelines, double touch is not.
  • It's what users expect; a user might not find a double touch action as they won't go looking for it
  • It's already handled in the API.

这篇关于如何检测双触摸/水龙头在Android的ListView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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