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. How to build full Android for X86 desktop PC - Ethernet is not working

I just installed Android (downloaded from git on : 04/21/2009) on EEE
PC 1000h. It took ages to install but it finished successfully.
Later I found that there is no eth0

# netcfg
lo     UP   127.0.0.1    255.0.0.0    0x00000049

# netcfg eth0 dhcp
action 'dhcp' failed (No such device)

# ifconfig eth0
eth0: No such devices

# lsmod
fbcon 38284 66 -Live 0xf8868000
i915 124548 2 - Live 0xf88c1000
drm 192064 1 i915, Live 0xf8981000
cfgcopyarea 3328 1 i915, Live 0xf8845000
cfbfillrect 3392 1 i915, Live 0xf8843000
cfgimgblt 2944 1 i915, Live 0xf8834000
font 8448 1 fcon, Live 0xf884f000
bitblit 5184 1 fcon, Live 0xf8840000
softcursor 2176 1 bilblit, Live 0xf8836000
atl2 27544 0 - Live 0xf8847000   <-------------- driver is loaded

I downloaded the driver from 
http://code.google.com/p/patch-hosting-for-android-x86-support/downloads/list
(patched it) and copy it to /lib/module, restarted android, checked
that the driver is loaded, however, ethernet is still
not working.

I've been trying to build android image with kernel 2.6.27, could
anyone please give any advice on how to make this possible?

Thank you.

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. How to update a Cursor

Hi,

I call ContentResolver's query method to get a Cursor, and I would
like to update the title of that row to 'new title'
can you please tell me how to do it?

final ContentResolver cr = context.getContentResolver();
 Cursor c = cr.query(MY_CONTENT_URI,
            new String[] { "title"}, "title=?",
            new String[] { title }, null);

if (c.getCount() > 0) {
 // want to update the title to 'new title'

}

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

3. Cupcake on ADP

4. How to deal with an app widget that can have variable sizes

5. Next Focus and the Soft Keyboard

6. Does android kernel supports ACPI?

7. Magic from Vodafone expected on 5 May