When I tried to use getPressure() in onTouchEvent(), the value is always
1.0 on Android 4.0. However, the value is okay(0-1) on Android 2.1. Is
there any problem?
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;
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en