Code example for MotionEvent

Methods: getRawYgetY

0
    /** 
     * MotionEvent has no getRawY(int) method; simulate it pending future API 
     * approval. 
     */ 
    private static float getRawY(MotionEvent event, int pointerIndex) {
        float offset = event.getY() - event.getRawY();
        return event.getY(pointerIndex) + offset;
    } 
 
    private void setContext(MotionEvent curr) {
        if (mCurrEvent != null) {
            mCurrEvent.recycle();
        } 
        mCurrEvent = MotionEvent.obtain(curr);
 
        mCurrLen = -1;
        mPrevLen = -1;
        mScaleFactor = -1;
 
        final MotionEvent prev = mPrevEvent;