Code example for LinkedList

Methods: addFirst, size

0
            break; 
        } 
    } 
 
    private int getPointersDown() { 
        return mPointerInfo.size();
    } 
 
    private int getActionIndex(MotionEvent event) {
        return (event.getAction() & MotionEvent.ACTION_POINTER_INDEX_MASK)
            >> MotionEvent.ACTION_POINTER_INDEX_SHIFT;
    } 
 
    private void onTouchStart(MotionEvent event) {
        mLastEventTime = event.getEventTime();
        mPointerInfo.addFirst(PointerInfo.create(event, getActionIndex(event)));
        if (getPointersDown() == 2) { 
            sendScaleGesture(EventType.BEGIN);
        } 
    }