That's right. There are several classes that you would learn from training, but two of them are Path and Paint. Basically, for each individual path in your drawing, you will create an instance of the Path and call various methods on this Path to add lines, arcs, rectangles, etc. Then each Path can be added to your canvas. Each time you add a Path to your canvas, you indicate the Paint object to use. The Paint object contains all kinds of information about how the path should be displayed on the canvas, including the stroke width; color; whether it's stroke, stroke and fill, or just filling; and so on.
Adding vector graphics to Canvas using Paths, Paint, etc. very simple and you will probably get it in a short time. I found that a tutorial called Android Vintage Thermometer was a great way to find out; where did i start
After you hang the straight lines on the canvas, perhaps the next step is to translate the screen touch events into a series of small segments of straight lines.
Edit:
Ok, so from your comment, I now understand that you are familiar with Android Path, etc., and I skipped this. Now I understand the problem, I think: what you want to do is save all the drawn graphics as vector data in memory, so that as soon as the paths are created (in response to the user's fingers), these paths will be saved in memory as vector data so that it can be retrieved and drawn again and again on the canvas at different scales (zoom levels) or different rotations, etc.
I am currently working on an SVG converter as part of a larger application. Now my SVG converter is designed to simultaneously analyze an SVG file, convert all data from an SVG XML file to the corresponding paths, Paint, Matrix, etc. All these vector objects are stored in ArrayLists. I also use a simple set of commands that is stored in memory to describe the order in which they should be extracted from memory (but this is beyond the scope of this). To draw all the graphics on the canvas, all the objects Path, Paint, Matrix, etc. Derived from ArrayLists in the correct order and applied to the canvas. This means that lengthy parsing of an SVG file occurs only once; after that, all vector graphics can be redrawn quickly and again, at any scale or transformation that I want.
Now SVG and much of what I told you about it are probably irrelevant, but my main point is that, like what I did, you can try to save all Path objects in List of some sort. When the user touches the screen and you create paths in response, and also applying these paths to the canvas, you also save all the individual paths in the list (for example, ArrayList<Path> ). Perhaps separate paths can be paired with the corresponding Paint object, which describes a specific color, stroke width, etc., that were selected when a particular path was selected. Whenever the user selects to zoom in or out (or any other event that requires dragging the canvas), you simply replay all these Paths from memory and write them to the canvas. As a further simplification, if the user is allowed only one Paint configuration (for example, if the user is allowed to draw white lines, for example, without width control), you can even save all the paths that the user draws one Path object into, adding each path using myPath.addPath (newPath) as you draw them.