android在屏幕上找到压力

android在屏幕上找到压力

本文介绍了android在屏幕上找到压力的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想大致了解一下android上手指在电容屏上按压的压力大小.我的想法是在手指被触摸时获取手指覆盖的区域(可能需要一些额外的参数来使其更准确,但这是主要思想).

I would like to roughly understand the amount of pressure the finger presses on the capacitive screen on android. My idea is to get the area covered by the finger when it is touched (maybe some extra parameters to get it more accurate, but thats the main idea).

那么,有什么办法可以找到被覆盖的吗?(例如获取覆盖的像素数).

So, is there any way to find the are covered? (for example get the number of pixels covered).

推荐答案

只有MotionEvent.getPressure()(您可能已经找到了).我怀疑是否有报告手指覆盖了多少像素的东西.

There is only MotionEvent.getPressure() (which you probably already found). I doubt that there is something that reports how many pixel are covered by the finger.

这篇关于android在屏幕上找到压力的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 21:44