Android的 - 如何获取原始的触摸屏信息? [英] Android - How do I get raw touch screen information?

查看:626
本文介绍了Android的 - 如何获取原始的触摸屏信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Android绘画应用程序,我想使用的原始数据从设备的触摸屏,因为它们会使调整用户的画笔。我看到那里的画笔的大小是根据您的指纹在屏幕上的尺寸其他应用程序为Android(iSteam等)。至于绘画应用程序走,那将是一个巨大的功能。

I'm working on a painting application for Android and I'd like to use raw data from the device's touch screen to adjust the user's paint brush as they draw. I've seen other apps for Android (iSteam, for example) where the size of the brush is based on the size of your fingerprint on the screen. As far as painting apps go, that would be a huge feature.

有没有办法得到这个数据?我GOOGLE了好一阵子,但我还没有发现证明它的任何来源。我知道这是可能的,因为海豚浏览器增加了支持多点触摸的英雄没有应用水平之下的任何更改。你必须能够获得原始数据或某事的二维矩阵...

Is there a way to get this data? I've googled for quite a while, but I haven't found any source demonstrating it. I know it's possible, because Dolphin Browser adds multi-touch support to the Hero without any changes beneath the application level. You must be able to get a 2D matrix of raw data or something...

我真的AP preciate任何帮助,我可以得到!

I'd really appreciate any help I can get!

推荐答案

有在运动的一些性质事件类。您可以使用<一个href="http://developer.android.com/reference/android/view/MotionEvent.html#getSize%28%29">getSize()方法查找对象的大小。该运动事件类还可以访问pressure,坐标等...

There are some properties in the Motion Event class. You can use the getSize() method to find the size of the object. The Motion Event class also gives access to pressure, coordinates etc...

这篇关于Android的 - 如何获取原始的触摸屏信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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