Code example for Canvas

Methods: drawArcdrawBitmapdrawCircle

	protected void onDraw(Canvas canvas) {
		dx = getXFromAngle();
		dy = getYFromAngle();
		canvas.drawCircle(cx, cy, outerRadius, circleRing);
		canvas.drawArc(rect, startAngle, angle, true, circleColor);
		canvas.drawCircle(cx, cy, innerRadius, innerColor);
	 * Draw marker at the current progress point onto the given canvas. 
	 * @param canvas 
	 *            the canvas 
	public void drawMarkerAtProgress(Canvas canvas) {
		if (IS_PRESSED) {
			canvas.drawBitmap(progressMarkPressed, dx, dy, null);
		} else { 
			canvas.drawBitmap(progressMark, dx, dy, null);
	 * Gets the X coordinate of the arc's end arm's point of intersection with 
Connect your IDE to all the code out there  Get Codota for Java