user909940
user909940

Reputation:

Android draw line with width

I know how to draw a line in Android, but how can I set the width of the line?

I tried to draw X lines nearly to have a width of X but I'm sure there is another way.

Upvotes: 3

Views: 9413

Answers (2)

Andy
Andy

Reputation: 11

Look in the online reference for android developers. Link to relevant section with DrawLines() and DrawLines() overloaded version... http://developer.android.com/reference/android/graphics/Canvas.html

Upvotes: 1

GrandMarquis
GrandMarquis

Reputation: 1913

When you set your new paint for drawing line on canvas,

just:

yourpaint.setStrokeWidth(23);

Upvotes: 19

Related Questions