I am using a CanvasView API I found online and I am wondering how to save the drawings made on the screen for when I change to and from activities.
This is the code that handles the canvas, it's pretty simple. However, whenever I go to and from a page, the drawings disappear. Does anyone know how I could save the drawings?
public CanvasView canvas;
public void initializeCanvas(View v, int color, float strokeWidth) {
canvas = (CanvasView)v.findViewById(R.id.canvas);
canvas.setMode(CanvasView.Mode.DRAW);
canvas.setDrawer(CanvasView.Drawer.PEN);
canvas.setPaintStyle(Paint.Style.STROKE);
canvas.setOpacity(200);
canvas.setPaintStrokeColor(color);
canvas.setPaintStrokeWidth(strokeWidth);
}