How to set gradient style to paint object?
<p>The code for drawing an arrow with <em>Style: Fill</em> is given below: </p>

<pre><code>paint.setColor(Color.parseColor("#bdc0dc"));
            paint.setStyle(Style.FILL);
            canvas.drawPath(arrowPath, paint);
            paint.setColor(Color.BLACK);
            paint.setStyle(Style.STROKE);
            paint.setStrokeWidth(2);
            canvas.drawPath(arrowPath, paint);
</code></pre>

<p>And the output I obtain is this : </p>

<p><img src="http://i.stack.imgur.com/jc1k2.png" alt="enter image description here"></p>

<p>Now what I want do is set style to Gradient(Style.gradient not present in android...) to obtain the arrow similar to the image given below : </p>

<p><img src="http://i.stack.imgur.com/pWXVJ.png" alt="enter image description here"></p>

<p>How do i do it ? I tried adding style in style.xml but was unable to add gradient there as it accepts item as parameter..</p>
