Android canvas draw line - make the line thicker

Solution 1:

Change the value of

myPaint.setStrokeWidth(8);

to a bigger integer, for instance:

myPaint.setStrokeWidth(50);

it will make the line thicker

see also Paint.setStrokeWidth(float)

Solution 2:

Try Including this line just after you decleare 'mypaint'

 mypaint.setStyle(Paint.Style.STROKE); 

Solution 3:

What happens if you remove the ANTI_ALIAS_FLAG? Also, you should move the Paint constructor outside the for loop, so it doesn't get recreated every iteration.