add text to a drawable? (maps question)

by Michael Dorin » Wed, 10 Mar 2010 23:26:31 GMT


Sponsored Links
 I am doing a map application and would like to put more than just a
'star' or a 'pin' on the map when it is selected.
Is it possible to make a drawable icon, and shove some text into it?
That way I could have a bit of info and the location tagged.

Thanks,
  Mike

--



add text to a drawable? (maps question)

by Mark Murphy » Wed, 10 Mar 2010 23:29:29 GMT


 


You can certainly have different Drawables per pin at runtime:

 http://github.com/commonsguy/cw-advandroid/tree/master/Maps/ILuvNooYawk/ 

I haven't tried creating a custom Drawable, rendered from a Canvas or
something, so I don't know much about that aspect.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Android Training...At Your Office:  http://commonsware.com/training 

--


Sponsored Links


Other Threads

1. Missing setListAdapter() Method?

I am working through the Notepad tutorial and notice that my project
will not compile on account of a missing setListAdapter() method call
in the Notepadv1.java.  In that java file there is a method called
fillData() which make the call to the missing method setListAdapter
(notes).

Can someone tell me where that method should be?  The tutorial appears
to be silent on the issue.

Thanks

--~--~---------~--~----~------------~-------~--~----~

2. Cupcake (1.5) and Maps

I am having a major issue migrating my map-based application from
Android 1.1 to 1.5.  Ever other android app I have -- the do not use
the maps -- has been upgraded.  Does any have a simple tutorial, tip,
or blog post about getting maps to work with 1.5.

Thanks

Ted

--~--~---------~--~----~------------~-------~--~----~

3. Creating Spinner in ExpandableList

4. Android video and audio application (x86 and ARM)

5. do you know how to change skin in android project?

6. Getting mock gps data

7. I can't get into developer.android.com site.