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;
}