Sunday, February 27, 2011

[android-developers] Position StaticLayout on Canvas

Hi
I am trying to draw some text onto a canvas.
I was using canvas.drawText() but i need the text to be wrapped so i am now using StaticLayout.draw(canvas) which works fine except i cannot position the text.
I have read some posts that suggest using canvas.translate(x,y) but when i have to draw more than one "text box" i translate the canvas the first time and the text box is positioned but then when i translate the next "text box" the canvas just translates off the screen.
Is there any way to position the text relatively to the screen. 

Any help would be great.
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

No comments:

Post a Comment