51

How to set line width? What method is used for it?

MMG
  • 3,226
  • 5
  • 16
  • 43
AndroiDBeginner
  • 3,571
  • 11
  • 40
  • 43

1 Answers1

98

Check out Paint.setStrokeWidth().

You draw by making various Drawable objects. The objects themselves are separated from the instructions about how to draw them; that's covered by the Paint class. Paint instances have a method that allows you set the width of the stroke that will be used to draw the objects, setStrokeWidth(), which is what you want.

John Feminella
  • 303,634
  • 46
  • 339
  • 357