How to position StaticLayout in android?

Nick picture Nick · May 25, 2010 · Viewed 7.6k times · Source

I want to created a wrapping text ontop of google maps api. I have been able to do this with a lot of code, but have been working on a better way. My latest attempt is to use the StaticLayout class and the text is wrapping, but I do not know how to position it...no matter what I try it is always starting in the top left corner of the screen....

Answer

veelci picture veelci · Jun 25, 2010

try doing a canvas.translate(x,y) before you call draw(c) on the layout.