Code example for Vector

Methods: add, get, size

0
 
        tp.cancel();
    } 
 
    public void addTouchPoint(int x, int y) {
        final int numPoints = mTouchPoints.size();
        int id;
        if (numPoints == 0) {
          id = 0;
        } else { 
          id = mTouchPoints.get(numPoints - 1).getId() + 1;
        } 
 
        mTouchPoints.add(new TouchPoint(id, contentsToWindowX(x), contentsToWindowY(y)));
    } 
 
    public void updateTouchPoint(int i, int x, int y) {
        TouchPoint tp = mTouchPoints.get(i);
        if (tp == null) {
            return; 
        }