Connecting Android XML and Code

Posted by Nick on Stack Overflow See other posts from Stack Overflow or by Nick
Published on 2010-05-25T13:36:03Z Indexed on 2010/05/25 13:41 UTC
Read the original article Hit count: 276

Filed under:
|
|

I'm new to android and have gotten used to doing all my previous UI in code. I can understand the simple examples, but I'm trying something more complex and have no idea how to do it in code and XML. I'm trying to use the google map api and draw text on the map at a specified spot. I have succeeded in doing so by extending overlay and overriding the draw method using drawtext. This has pretty much accomplished what I'm looking to do, but I want have read that is poor practice. I now want to add a second line below the first and just using \n does not work. I can work it out using another drawtext method, but I figured it would be better to create a custom textview, I just have no idea how to position it using code and encapsulate it inside the overlay. Maybe the way I'm doing it is the best way...

© Stack Overflow or respective owner

Related posts about android

Related posts about maps