문제

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