getPressure始终返回1.0 [英] getPressure always returning 1.0

查看:133
本文介绍了getPressure始终返回1.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道为什么 getPressure()总是返回 1.0 吗?

Does anyone have any idea why getPressure() returns always 1.0?

这是我的代码:

@Override
    public boolean onTouchEvent(MotionEvent event) {
        super.onTouchEvent(event);

        System.out.println(event.getPressure());

        return true;

    }

推荐答案

有人知道getPressure()为什么总是返回1.0吗?

Does anyone have any idea why getPressure() returns always 1.0?

典型的触摸屏/输入设备无法测量压力.您要么不按下就没有触摸事件,要么就按下并得到了值为1的触摸事件.

The typical touchscreen / input device has no way to measure pressure. You either don't press and get no touch event or you press and get a touch event with value 1.

这篇关于getPressure始终返回1.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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