gpt4 book ai didi

android - MotionEvent API getPressure、getSize 的指标

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:16:18 24 4
gpt4 key购买 nike

我正在开发一个使用函数作为标题的程序。

存在一个问题,即上述功能在 API 网站上没有它们的指标。

为了避免误会,这里举一个我之前提到的“metric”的例子。

例。大小=像素,压力=千克(kg)

我完全不知道这个指标。

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

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

再次感谢。

最佳答案

getPressure(int)医生说:

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)医生说:

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 的指标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3913808/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com