>From a Google UI engineer: http://www.pushing-pixels.org/2010/12/16/meet-the-green-goblin-part-4.html
On 17 December 2010 23:33, HippoMan <[email protected]> wrote: > Yes, but I can only apply this math if I know how the text will be > word-wrapped. This means that I have to word-wrap it myself and then > do the calculations. > > The problem with this is that I may not wrap the text the same way > that the TextView (or other subsidiary object) wraps it. > > I'm sure I can dig through the source code to find the algorithm that > the appropriate Android object uses to perform the word wrapping. > However, there is no guarantee that this is the same algorithm that > will be used in other Android versions. Therefore, my code might break > when run in the future. > > For that matter, future versions of Android might also manage spacing > and fonts differently than today's version. > > This is why I was hoping for a way to query Android objects, > themselves, to find out exactly how much text will fit into the > visible area of the View. If this info were returned via method calls, > it would be a lot less likely that future versions of these methods > would fail to provide the correct data for the given Android version. > > But I guess I'm just SOL about this. It's too bad that Google didn't > see fit to encapsulate the functionality that I'm looking for. I > couldn't possibly be the only person who would need it. > > -- > 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 > -- 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

