You can't easily do this because when an activity is not in the
foreground/visible, its window is hidden (and thus its surface destroyed) in
order to save memory.  If you take the easy approach of just not doing this,
then you will quickly run out of memory for window surfaces.  So you will
need to do some subtle modification to the activity manager to keep more
than just the foreground window visible.  This is something I would
recommend that you avoid doing, since even for someone who knows that code
well it is likely to introduce subtle problems that need to be fixed.

On Thu, Apr 16, 2009 at 3:57 PM, tonyzh <zhouz...@gmail.com> wrote:

>
> Hi,
>
> I am from an OEM and we are doing some android customization work.
> What we want to achieve is that for example, there are only two
> applications (e.g. contacts and browser) running on the phone. Browser
> is currently active, focused and visible to users, and Contacts is
> paused, "under" Browser and not visible to users. For some special
> cases, e.g, a special key event will trigger it, we want to "move" the
> Browser window towards the screen bottom a little bit, for example 100
> pixels. And at the moment, we can see part of the Browser window and
> part of Contacts window (which is originally covered by the Browser
> window and invisible to the user). How can we achieve this?
>
> I took a look at the implementation of WindowManagerService and made
> some changes to adjust the mAttrs.y of the top WindowState object in
> the mWindows stack. In some cases, it is working and I can see two
> windows, but in some cases, for example, if we use Browser and
> AlarmClock as test case, it is not working.
>
> Can someone explain to me how Android control which window to draw on
> the screen?
>
> Thanks,
>
>
> Zhinan
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to android-framework@googlegroups.com
To unsubscribe from this group, send email to 
android-framework+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to