[android-developers] Re: draw text as big as possible inside a rectangle

2009-04-13 Thread Michael Bollmann
thanks for your reply in case anyone runs into the same problem i solved it using getTextBounds 1. calculate the scale factor between your original rect and the rect returned by getTextBounds 2. multiply the font size by this factor --~--~-~--~~~---~--~~ You

[android-developers] Re: draw text as big as possible inside a rectangle

2009-04-11 Thread Ralf
Are you looking for Paint.measureText? http://developer.android.com/reference/android/graphics/Paint.html#measureText(java.lang.String) Example here: http://developer.android.com/guide/samples/ApiDemos/src/com/example/android/apis/graphics/MeasureText.html R/ On Sat, Apr 11, 2009 at 6:42 AM,