Android BiColored line
<p><strong>Hello,</strong> I have a line drawn vertically, let's say it has 100 pixels. I want to make this line half lenght white, half lenght red. Can I achieve this with a gradient ? </p>

<p>I tried stuff like</p>

<pre><code>linePaint.setShader(
new LinearGradient(x,y, x1, y2, 
new int[] { Color.WHITE, Color.RED},
null,
Shader.TileMode.MIRROR));

canvas.drawLine(x,y,x1,y1,linePaint);
</code></pre>

<p>In .NET is very simple to do this with a gradient but in Android I'm stuck. Any help is really appreciated. Thank you.</p>
