Code example for Vector

Methods: add, get, remove, size

0
        mPaint=paint;
    } 
     
    @Override 
    public void addPoint(PointF point) {
        mPoints.add(point);
        draw(mPaint);
    } 
 
    @Override 
    public void draw(Paint paint) {
        if(mPoints.size()==2){//if there is 2 points to inpterpolate between
            PointF a=mPoints.get(0);
            PointF b=mPoints.get(1);
            mCanvas.drawLine(a.x, a.y, b.x, b.y, mPaint);
            mPoints.remove(0);
        } 
    } 
 
    @Override 
    public void clear() {