How to set gradient style to paint object?
问题 The code for drawing an arrow with Style: Fill is given below: 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); And the output I obtain is this : 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 : How do i do it ? I tried adding