I'm trying to get the width in pixels of a text string I'm getting a value of 8, which does not make ence since that would mean each letter is 1 pixel whide. I have the following code
Rect bounds = new Rect();
Paint paint = new Paint();
paint.setTextSize(12);
paint.getTextBounds("ABCDEFGHI", 0, 1, bounds);
width=bounds.right; // this value is 8
bounds has the values of 0,0,8,9