When I tap the screen of Android 4.0, the value of getPressure() is always 1.0. The value is okay on Android 2.1. Is there any problem? The testing device is Samsung Galaxy S III. The code is like this:

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

    float allWidth = this.getWidth();
    float allHeight = this.getHeight();

    calculate(event.getX(), event.getY(), allWidth, allHeight,
            event.getPressure());   
    return true;
}

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top