When does the canvas' onDraw function get called?

by Mariano Kamp » Fri, 06 Mar 2009 06:01:23 GMT

Sponsored Links
 after the state of something you are interested in changes you can call
invalidate() on the canvas which will afaik cause the canvas to be redrawn
as soon as the UI thread gets to it.


Other Threads

1. Intent to notify??

I was wondering if it was possible to have an intent that would fire
off a notification. I need this because I'm running a service that has
proximityAlerts registered on a LocationManager and I would like to
have it so that when one of these alerts is triggered, a notification
shows up in the status bar. I wish there was a way to just fire a
function rather than using an intent here, but I don't think there is.
Any help is appreciated!!


2. Couple questions regarding gestures and system uis

Yes, you can have a program start up on boot. That's OK if you are using
it to schedule tasks via AlarmManager or something. Trying to have
something run forever is not a good design move:


You cannot just have a random thread floating around the ether. It needs
to be associated with some component (usually an activity or service).

Most "system events" are broadcast Intents. You do not need to have
anything start at boot or have any long-running threads for that. Just
set up BroadcastReceivers, registered in your manifest, that will get
control on those events and register Notifications.

If you do that, users will attempt to perform anatomically inappropriate
things to you. Users really dislike being interrupted in the middle of
their game, phone call, text message, browsing, etc.

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

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.6 Available!


3. MovieViewControl unable to become a receiver during Broadcast.

4. How to tell if headphones are plugged in

5. Possible to customize a submenu?

6. stack trace not helping

7. Display multiple images from a remote source in a gallery (zoomable+pannable)