Measuring Text

1 · Chris Banes · March 27, 2014, 3:08 p.m.
If you start manually drawing things to Android’s Canvas, you will probably start to draw text as well. When doing so you need to know where to position the text when you draw, and to do that you will need to measure the text before drawing it, to compute the starting x/y values. In an app recently I needed to draw some text centered both vertically and horizontally on the......