Code example for ScaleGestureDetector

Methods: onTouchEvent

        return true; 
    private void activateScaleDetector(MotionEvent ev) {
    private void updateXYPositionSimpleTouch(MotionEvent ev) {
        mLastTouchX = ev.getX();
        mLastTouchY = ev.getY();
    private void updatePointerId(MotionEvent ev) {
        final int pointerIndex = (ev.getAction() & MotionEvent.ACTION_POINTER_INDEX_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT;
        final int pointerId = ev.getPointerId(pointerIndex);
        if (pointerId == mActivePointerId) {
            // This was our active pointer going up. Choose a new 
            // active pointer and adjust accordingly. 
Stop searching for code, let great code find you!  Add Codota to your java IDE