Android:通过手指触摸屏幕来测量/检测覆盖区域(不仅仅是触摸坐标) [英] Android: Measure/detect covered area by a finger touch on screen (NOT only touch coordinates)

查看:44
本文介绍了Android:通过手指触摸屏幕来测量/检测覆盖区域(不仅仅是触摸坐标)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 Android 上为每个触摸事件访问手指覆盖的区域.

I would like to get access to the area covered by a finger for each touch event on an Android.

每个触摸事件都会产生一个坐标对 X 和 Y,与触发事件的手指大小以及触摸区域的大小无关.

Every touch event will result in a coordinate pair X and Y independent of how big the finger and consequently the touch area is that triggered the event.

我想知道是否有办法获取触发触摸事件的区域数据,例如尺寸或坐标不是

I was wondering if there is a way to get the area data which triggered the touch event e.g. size or coordinates NOT

非常感谢任何帮助.

预先感谢您的回答或重定向,

Thanks in advance for you answer or redirects,

基督徒

推荐答案

motionEvent.getSize() 方法应该给你你想要的(但准确度可能会因设备的屏幕而异).

The method motionEvent.getSize() should give you what you want (but the level of accuracy may vary depending on the device's screen).

这篇关于Android:通过手指触摸屏幕来测量/检测覆盖区域(不仅仅是触摸坐标)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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