[android-developers] Re: Homescreen widget - sizing font to fit content.
Maybe use this function in the Paint class:
public float measureText (String text)
Added in API level 1
Return the width of the text.
Parameters
text
The text to measure. Cannot be null.
Returns
The width of the text
On Tuesday, November 27, 2012 1:15:53 PM UTC-6, MarkG123 wrote:
--Hi, trying to work out how to set a TextView in a homescreen widget, so the font is correct and nothing is truncated.
This is a resizable homescreen/lockscreen widget.
Can someone give me a pointer? Thanks.
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home