Strange problem I'm having here. I add to an arraylist when the user clicks on the view. I get the position and add it to an ArrayList of coordinates. I then draw a circle on the canvas where the coordinates says to do so. The Size check in onDraw always returns 0.
private static ArrayList<Coordinate> coords = new ArrayList<Coordinate>();
OnTouchEvent
...
case MotionEvent.ACTION_POINTER_UP: {
mLastTouchX = event.getX();
mLastTouchY = event.getY();
this.coords.add(new Coordinate(mLastTouchX, mLastTouchY));
break;
...
OnDraw
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
for(int i = 0; i < this.coords.size(); i++) {
canvas.drawCircle(coords.get(i).x, coords.get(i).y, 30.0f, mPaint);
}
}