OnTouch /听众的OnClick。同时使用? [英] OnTouch/OnClick listeners. Use both?

查看:118
本文介绍了OnTouch /听众的OnClick。同时使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简短的问题。我应该同时OnTouch和听众的OnClick使用?
如果我真的正确的是触摸屏等是与它进行设备。我错了吗 ?如果不是我应该同时使用监听器,以确保这两个类型的设备?

I have a short question. Should I use in same time OnTouch and OnClick listeners ? If I`m correct one is for touch screens and other is for devices with out it. Am I wrong ? If not should I use both listeners to secure both kind of devices ?

推荐答案

您只需要 OnTouch 如果你有一些事件应该只带触摸屏的发生。如果你只是想要做的事当用户点击(或点击),那么你只需要的OnClick

You only need OnTouch if you have some event that should only happen with a touch screen. If you just want to do something when the user taps (or clicks), then you only need OnClick.

这篇关于OnTouch /听众的OnClick。同时使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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