为什么touchMajor和touchMinor是一样的?如何配置?

时间:2013-09-03 11:01:14

标签: android motionevent

我的问题是,为什么touchMajor和touchMinor是一样的?根据{{​​3}},我认为touchMajor和touchMinor应该是不同的。我需要一些配置吗?

@Override
public boolean onTouchEvent(MotionEvent event) {
    // TODO Auto-generated method stub
    switch (event.getAction() & MotionEvent.ACTION_MASK) {
    case MotionEvent.ACTION_DOWN:
    case MotionEvent.ACTION_MOVE:
        double x = event.getX();
        double y = event.getY();

        double pressure = event.getPressure();
        double size = event.getSize();
        double touchMajor = event.getTouchMajor();
        double touchMinor = event.getTouchMinor();
        double toolMajor = event.getToolMajor();
        double toolMinor = event.getToolMinor();
        double orientation = event.getOrientation();

        Log.i("touchevent", "\t" + x + "\t" + y + "\t" + pressure + "\t" + 
        size + "\t" + toolMajor + "\t" + toolMinor + "\t" + touchMajor + "\t" + touchMinor + "\t" + orientation);

        break;
    case MotionEvent.ACTION_UP:
        break;

    default:
        break;
    }

    return true;
}

0 个答案:

没有答案