draw text as big as possible inside a rectangle

by Ralf » Sun, 12 Apr 2009 10:37:14 GMT


Sponsored Links
 Are you looking for Paint.measureText?
 http://developer.android.com/reference/android/graphics/Paint.html #measureText(java.lang.String)

Example here:
 http://developer.android.com/guide/samples/ApiDemos/src/com/example/android/apis/graphics/MeasureText.html 

R/

On Sat, Apr 11, 2009 at 6:42 AM, Michael Bollmann



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



Other Threads

1. VideoView black after activity switch

Hi all,

I've got a problem with VideoView that I would love some input on.

The setup is basically an activity that starts by launching the
gallery with the intent of opening a video. Once that returns, the
activity displays a contentview consisting of some views. Acting upon
one of the views will set the currently visible controls to "gone" and
make a VideoView "visible", which plays the video, and once that is
done it returns to the previous state by setting the VideoView to
"gone" and vice versa.

This all works fine, and I can switch between the "control" mode and
"play" mode ad infinitum, however going back one more step, thus
switching activities to the gallery and selecting a new (or the same)
video file and then repeating the steps mentioned above results in the
video playing back only sound, without picture (the VideoView area of
the screen remains black).

The instances of both the container and VideoView are the same before
and after the activity switch, I have tried playing around with Z
order, bringing the video view to front, unfreezing the underlying
surface and a lot of other things I can't remember off the top of my
head, but without success...

Any ideas?

Best Regards
Anders

-- 

2. IntentService - will it block?

I have to process some events given by a broadcast receiver.
As kindly suggested by Mark M. a week ago, I am trying to send the
intent to an intentservice in order to pass the data to be processed
to another thread.

Looking at the doc, I can read abot onHandleIntent:
"Only one Intent is processed at a time, but the processing happens on
a worker thread that runs independently from other application logic.
So, if this code takes a long time, it will hold up other requests to
the same IntentService, but it will not hold up anything else.

What does it mean? Will the intents be queued and then processed one
by one, or does it mean that the startService will block if the
intentService is busy processing a previous intent?

And more (this is just my curiosity):
What is the point in having a onStartCommand method in IntentService
if the Intents must be processed in "onHandleIntent"?

Why the IntentService has all the onBind facilities if it will die
when it finish its job?

Thanks a lot in advance,

   Federico

-- 

3. Wtc silikoncase evo 4G, jelly case droid incridible,desire.

4. alsa drivers,suspend and other fixes for 2.6.32 msm branch

5. X10 Black, 拢250.0

6. Update! WTS motorola milestone 2nd

7. Doubt about RingtoneManager and Soundpool class