Hi all, I'll like to know how to calculate the actual pixels a text occupies in the screen from its font size.
Say, my font size of the text in TextView is 20.5px. It doesn't mean that every character of the text occupies 20.5px in the screen, does it? I'm inheriting android.widget.TextView to implement a TextView which text can be scrolled automatically. Just as the behavior of the HTML <marquee/>. I need to know the actual pixels the text occupied to determine how far I shall scroll the text. However the getTextSize() * getText().length() is much longer than the actual length of the text, so I can't make the text re-displayed on time. Thank you in advance for helping me. BR xion...@beijing, China [email protected] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" 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-developers?hl=en -~----------~----~----~----~------~----~------~--~---

