Drawing in Android Studio - deltagruppen/circles GitHub Wiki

To be able to draw figures, the following four classes is necessary: android.graphics.Bitmap, android.graphics.Canvas, android.graphics.Paint and android.graphics.Path. Bitmap holds the pixels, Canvas holds whatever is drawn, Paint is the color and Path is for example geometric shapes.

A psuedocode example follows:

import android.graphics.AboveFourClasses

public void drawACircle () {

Bitmap bitmap = Bitmap.createBitmap(width, height, config);
Some other code
Canvas c = new Canvas(bitmap);
c.drawCircle(float x-coord, float y-coord, float radius, paint color);
Yet some other code

}

For a tutorial http://code.tutsplus.com/tutorials/android-sdk-create-a-drawing-app-interface-creation--mobile-19021 seems to be a decent choice, as well as http://developer.android.com/training/custom-views/custom-drawing.html.