Drawing image with dynamic text

by Neilz » Wed, 09 Dec 2009 19:50:20 GMT


Sponsored Links
 Hi all.

I understand the principle of a 9Patch image where the image stretches
to fit the text within it. But this all assumes that the image is a
background to a TextView, or similar.

What I want to do is draw an image to the canvas, and set the
contained text at the time (currently I'm using canvas.drawText) - but
here the image has no connection with the text, or with a view, so it
wouldn't know to stretch.

I know this can be done, I've seen it, I'm just not sure how to go
about it... it's a bit like on google maps where you have a marker
with a cloud image containing the info, it is set dynamically. Any
ideas appreciated!

--



Other Threads

1. DDMS Screen Capture won't work for WVGA854?

I just build a AVD with the WVGA854 spec.
My app runs in it nicely, but DDMS Device Screen Capture just says "Screen
not available".

Is there any way to get this to work?

-- 

2. Can't see my view structure by HierarchyViewer

Hi, all
I've been using HierarchyViewer to see view structure of emulator, and
tried to test on actual phone device. However, I tried around 4 phones
(rooted and debug mode) and fails 3 of them. Really have no idea why
it happens??!!

Anyone has the suggestion to fix it? Thanks so much....

-- 

3. Eclipse Stuck at "Android SDK: Resolving error markers"

4. ARM TrustZone features

5. performance when passing background data to ui thread

6. Froyo porting, vendor & device folder, and build for a device with tapas

7. System Bar location and height in Honeycomb?