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

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

问题描述

我想获得获得了在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

任何帮助是非常AP preciated。

Any help is much appreciated.

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

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).

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

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