android–MotionEvent API的度量标准getPressure,getSize

android–MotionEvent API的度量标准getPressure,getSize,第1张

概述我正在研究一个使用函数作为标题的程序.有一个问题,上面的功能在API网站上没有他们的指标.为了避免误解,这里有一个关于我之前提到过的“度量”的例子.防爆.尺寸=像素,压力=千克(kg)我根本不知道这个指标.请告诉我在哪里可以找到我需要的信息.或者,在这个主题下告诉我.再次.

我正在研究一个使用函数作为标题的程序.

有一个问题,上面的功能在API网站上没有他们的指标.

为了避免误解,这里有一个关于我之前提到过的“度量”的例子.

防爆.尺寸=像素,压力=千克(kg)

我根本不知道这个指标.

请告诉我在哪里可以找到我需要的信息.

或者,在这个主题下告诉我.

再次.

解决方法:

getPressure(int) doc说:

Returns the current pressure of this event for the given pointer index (use getPointerID(int) to find the pointer IDentifIEr for this index). The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure), however values higher than 1 may be generated depending on the calibration of the input device.

因此压力以抽象度量来衡量.

getSize(int) doc说:

Returns a scaled value of the approximate size for the given pointer index (use getPointerID(int) to find the pointer IDentifIEr for this index). This represents some approximation of the area of the screen being pressed; the actual value in pixels corresponding to the touch is normalized with the device specific range of values and scaled to a value between 0 and 1. The value of size can be used to determine fat touch events.

并且大小似乎也用抽象度量来衡量.

总结

以上是内存溢出为你收集整理的android – MotionEvent API的度量标准getPressure,getSize全部内容,希望文章能够帮你解决android – MotionEvent API的度量标准getPressure,getSize所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1118675.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存