Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.
by c3r13e12u5 » Wed Oct 29, 2008 3:28 am
How can i get how many pixels will be used to draw a String on the canvas?
in J2ME we can use Font.stringWidth(String s). how about in Android?
-
c3r13e12u5
- Developer

-
- Posts: 28
- Joined: Wed Oct 08, 2008 7:33 am
by c3r13e12u5 » Tue Nov 04, 2008 2:07 am
Finally got the code:
Using java Syntax Highlighting
Paint p = new Paint();
p.measureText("Test Measure Text");
Parsed in 0.029 seconds, using
GeSHi 1.0.8.4
-
c3r13e12u5
- Developer

-
- Posts: 28
- Joined: Wed Oct 08, 2008 7:33 am
Return to View, Layout & Resource Problems
Who is online
Users browsing this forum: No registered users and 6 guests