What you get is exactly what is specified in the drawLines documentation.
One way of doing what you want would be to construct a Path from that data, and use drawPath
rather than drawLines
. Something like:
Path _path = new Path();
_path.moveTo(_data[0], _data[1]);
for (int i=2; i<_data.length; i+=2) {
_path.lineTo(_data[i], _data[i+1]);
}
Then draw it with:
_canvas.drawPath(_path, _paint)
From the Path
docs:
The Path class encapsulates compound (multiple contour) geometric paths consisting of straight line segments, quadratic curves, and cubic curves. It can be drawn with canvas.drawPath(path, paint), either filled or stroked (based on the paint's Style)
So you might have to change you're paint's style to get the right effect.