Create a Path

A Path is a series of shapes, e.g. a series of lines that make a triangle. A Canvas can draw a path just like it can draw a circle or draw a rectangle. We create a Path because we want to draw the triangle twice: first filled in red, then stroked (outlined) in blue.

Source code in Triangle.zip

  1. TriangleActivity.java
  2. TriangleView.java
  3. AndroidManifest.xml