0

Possible Duplicate:
How to get string width on Android?

How to calculate length of string to dp(dip) or px?

Community
  • 1
  • 1
Chris.Z
  • 35
  • 1
  • 4
  • 1
    It depends on the characters in the string, the font and the font size for starters. And dpi (dots per inch) is the entirely wrong unit for this, it's a density and a property of the display. –  Feb 27 '12 at 14:37
  • 1
    Maybe [this post][1] will help u to solve problem.. cheers [1]: http://stackoverflow.com/questions/6157652/android-getmeasuredheight-returns-wrong-values Edit: I think @Zortkun pointed you to the better link.. ;) – Ewoks Feb 27 '12 at 14:47

0 Answers0