Touch设备(IOS,Android的) [英] Touch devices (iOS, Android)

查看:179
本文介绍了Touch设备(IOS,Android的)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有对触摸输入任何规模有多大?我知道有感性的设置,如果你触摸或不说,但它具有一定的规模硬pressure和低pressure呢?

Are there any scale on the touch inputs? I know there is sensibility settings to say if you touch or not, but does it has a scale for hard pressure and low pressure too?

如果有,是什么规模呢? 0到1或0-255还是什么possiblities?

If so, what scale is it? 0 to 1 or 0-255 or what possiblities?

推荐答案

嗯,这完全取决于API。 Android的,例如,有一个获取pressure()访问的MotionEvents返回0.0和1.0F之间的浮动,但是你的结果的实际粒度显然取决于硬件 - 如果屏幕只能检测与非pressedpssed $ P $,你将永远只能拿到0.0或1.0F

Well, that entirely depends on the API. Android, for example, has a getPressure() accessor in MotionEvents that returns a float between 0.0f and 1.0f, but the actual granularity of your result obviously depends on the hardware - if the screen can only detect "pressed" vs "non-pressed", you will only ever get 0.0f or 1.0f.

编辑:按胡里奥峡谷的回答,iOS的不提供此功能

As per Julio Gorgé's answer, iOS does not offer this functionality.

这篇关于Touch设备(IOS,Android的)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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