Code example for Point

Methods: set

0
		float x = event.getX();
		float y = event.getY();
		switch (event.getAction()) {
		case MotionEvent.ACTION_DOWN:
			path.moveTo(x, y);
			point.set((int) x, (int) y);
			return true; 
		case MotionEvent.ACTION_MOVE:
			path.lineTo(x, y);
			break; 
		default: 
			return false; 
		} 
		invalidate();
		return true; 
	} 
} 
Contextual code suggestions in your IDE  Get Codota for Java