title: How to draw an arrow using android graphic class?
body: <p>How can i draw an arrow using the graphics class?</p>
  
  <p>Im using android graphics class and basically im trying to show a path on a map. So i need to print an arrow head on the canvas. Help me to figure out!</p>
  
  <p>Thank you!</p>
  
  <p>This is one of the methods i have used to draw a line. i want to print an arrow head on the edge of each and every line.</p>
  
  <pre><code>//       ArrayList&lt;Point&gt; ArrayListPoints = new ArrayList&lt;Point&gt;(); // Assign the shortest path here
  
  //       ArrayListPoints.add(new Point(262,100));
  //       ArrayListPoints.add(new Point(262,165));
  //       ArrayListPoints.add(new Point(346,165));
  //       ArrayListPoints.add(new Point(420,165));
  
         ArrayList&lt;Point&gt; ArrayListPointsFINAL;
  
      ArrayListPointsFINAL = storePath.ArrayListPoints;
  
      if(ArrayListPointsFINAL == null){
          System.out.println("ArrayListPointsFINAL is NULL");
      }
      else{
  
      ArrayList&lt;Float&gt; ArrayList_X = new ArrayList&lt;Float&gt;();
       ArrayList&lt;Float&gt; ArrayList_Y = new ArrayList&lt;Float&gt;();
       //int size = get.ArrayListPoints.size();
  
      for(int i=0; i&lt;ArrayListPointsFINAL.size(); i++){
          ArrayList_X.add(Float.parseFloat(String.valueOf(ArrayListPointsFINAL.get(i).x)));
          ArrayList_Y.add(Float.parseFloat(String.valueOf(ArrayListPointsFINAL.get(i).y)));
            }   
  
      for(int i=1; i&lt;ArrayList_X.size(); i++){
          Paint myPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
          myPaint.setStrokeWidth(8/*1 /getResources().getDisplayMetrics().density*/);
          myPaint.setColor(0xffff0000);   //color.RED
         // myPaint.setStyle(myPaint);
  
         canvas.drawLine(ArrayList_X.get(i), ArrayList_Y.get(i), ArrayList_X.get(i-1), ArrayList_Y.get(i-1),myPaint);       
  
      }
  </code></pre>