Hi, I have a TextView whereby the text size is scaled to fill as much space as possible (I'm basically doing this by repeatedly calling a Paint#getTextBounds() of the text until it is larger than the TextView#getWidth(), if there is an easier way I would love to hear it). I want the text to scale to fit if the TextView changes size.
I'm just wondering what the best way to do this is? I can't figure out exactly when in an Activity lifecycle we know for sure the layout is setup - when I call TextView#getWidth() in the Activity#onResume(), it is 0. From what I've read I should be looking at the View#onSizeChanged () method. I'm not sure how to use this however. Should I be subclassing the TextView to add my own setOnSizeChangedListener where I can update my various TextViews? Or is there another established pattern for this? cheers --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

