That's a great explanation - I'm glad you appreciated the vid too.

My only concern about the vid is that my knowledge is not all
encompassing and I would be "vilified" for it but if I continue to
make vids and receive feedback such as this then I will start to
be a very happy coder indeed.

Regards
D.

On Jun 5, 7:04 am, hackbod <[EMAIL PROTECTED]> wrote:
> Nice video!  Here's an explanation of what is going on with the
> incoming call window: that is not implemented as an activity, so it
> does not cause the activity behind it to be paused.  (There are a few
> other similar things like this, such as the notification panel you can
> slide down from the status bar, and the power menu that is displayed
> when doing a long hold on the end call key.)
>
> If what you care about is that you are losing input focus (which is
> the case for all of these non-activity windows), you can find this out
> by implementing onWindowFocusChanged() on a view in your activity.
> This also lets you find out about losing focus to menu panels when the
> menu key is pressed, Dialogs that are shown, etc, all of which are not
> activities so likewise don't cause onPause() to be called.
>
> An example of where you probably want to use onWindowFocusChanged()
> rather than onPause() is a game, where it would pause itself when
> losing focus.
>
> The key difference between losing window focus and being paused, is
> that being paused means that your activity is being put to the
> background, and so can be killed by the system if needed to reclaim
> resources for whatever is in the foreground.  Thus you will do things
> like save data being edited in onPause(), as compared to reacting to
> losing focus in onWindowFocusChanged().  In other words, these system
> windows (incoming call, power dialog, notification panel) or
> application menu or dialog windows do not impact the activity
> lifecycle: the activity really is still in the foreground, insofar is
> the system will not consider it a candidate to be killed if it needs
> more memory, and from that perspective it is able to continue behaving
> as a foreground activity.
>
> On Jun 3, 6:41 am, Damien <[EMAIL PROTECTED]> wrote:
>
> > Hi
>
> > I have a produced a "tutorial" screencast; the title is LifeCycleDemo.
> > The screencast covers the Activity life cycle and also introduces the
> > watcher to logcat and gsm. To view LifeCycleDemo go to
>
> >http://blip.tv/file/958450/
>
> > I intend to make more screencasts over the next few months so your
> > feedback on this topic is very welcome.
>
> > Further screencasts will be released on blip.tv and blogged about here
>
> >http://sleepydroid.blogspot.com
>
> > Please email your comments / criticisms to
>
> > [EMAIL PROTECTED]
>
> > Regards
> > Damien
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to