You can use the various options in WindowManager.LayoutParams to control how
your window is sized (you'll want WRAP_CONTENT to not be full screens),
where it is placed on screen (absolute position and/or gravity constants to
place relative to an edge), etc.

On Mon, Feb 8, 2010 at 11:34 PM, sheng wang <[email protected]> wrote:

> Hi
>
> About the "make your window not fullscreen". The activity starts full
> screen. I remember some theme can make the activity not fullscreen. But it's
> not so  flexible, the floating window will be centered on the screen and can
> not be moved(correct me if I'm wrong)
>
> Besides the theme, are there any other way to make a activity not
> fullscreen ?
>
>
>
> 2010/2/9 Dianne Hackborn <[email protected]>
>
>> Hi,
>>
>> You can't get the activity behind unless it is your own.  Otherwise it is
>> in another process and untouchable by you.
>>
>> There is only ever one activity resumed at a time, so if you are in the
>> front and resumed, then the home screen (or whatever) behind you is paused
>> (though not stopped because it is still visible).
>>
>> The only way to let events get to the window behind yours is to make your
>> window not fullscreen, and set
>> WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL to tell the window manager
>> that touches outside of your window should be delivered to whatever is
>> behind it.
>>
>> On Mon, Feb 8, 2010 at 7:17 PM, sheng wang <[email protected]> wrote:
>>
>>> Hi GuoBin,
>>>
>>> 1.  My translucent activity will be the root acitivity, and very possible
>>> the home screen will be just behind, but what is the programmable way that
>>> can  get a  activity  variable equals to the Home Launcher ?
>>>
>>>
>>>
>>> 2010/2/8 Guobin <[email protected]>
>>>
>>>> 1. Possibly there are ways to find the activity behind the current
>>>>
>>>> one.
>>>> Precondition: All activity are fullscreen.
>>>> If your activity is the root activity, then Home is in behind.
>>>> Otherwise find the previous activity in the task stack.
>>>>
>>>
>>> 1.  My translucent activity will be the root acitivity, and very possible
>>> the home screen will be just behind, but what is the programmable way that
>>> can  get a  activity  variable equals to the Home Launcher in my activity?
>>>
>>>
>>>> 2. You could send the touch event to other activity, but it's useless
>>>> I think.
>>>> The Android Window Mananger can only handle UI events for one view
>>>> hirarchy at one time.
>>>> May you send the event to the other activity, but no one can handle
>>>> it.
>>>>
>>>
>>> 2.  In my understanding the activity behind in  OnResume status, but it's
>>> still running.  I'm really not sure about that I will try some test on it .
>>>
>>>
>>>>
>>>> BRs
>>>> Guobin
>>>>
>>>> On Feb 8, 12:50 pm, sheng wang <[email protected]> wrote:
>>>> > Hi GuoBin,
>>>> >
>>>> > I understand what u mean below. I think that's the standard way the
>>>> android
>>>> > deal with the event. Event goes through a current path within the
>>>> activity.
>>>> > No event will go out of the current activity.
>>>> >
>>>> > As a surround way, is there any method that can let the current
>>>> activity
>>>> > find out who is behind him? so he  might communicate with the one
>>>> behind
>>>> > it?
>>>> >
>>>> > Anyway, think you for taking your time to think the question.
>>>> >
>>>> > Shawn.
>>>> >
>>>> > 2010/2/8 Guobin <[email protected]>
>>>> >
>>>> > > > 1. Whether the event can be send down to any thing behind the
>>>> current
>>>> > > > activity.
>>>> > > No, you can't.
>>>> > > On the Android platform, you define an Activity's UI using a
>>>> hierarchy
>>>> > > of View and ViewGroup nodes.
>>>> > > Home & your activity are different activity, they have their own
>>>> view
>>>> > > hierarchy.
>>>> > > Key events are always delivered to the View currently in focus. They
>>>> > > are dispatched starting from the top of the View hierarchy, and then
>>>> > > down, until they reach the appropriate destination.
>>>> > > But not the view of other activity.
>>>> > >http://developer.android.com/guide/topics/ui/ui-events.html
>>>> >
>>>> > > Guobin
>>>> >
>>>> > > --
>>>> > > 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]<android-developers%[email protected]>
>>>> <android-developers%[email protected]<android-developers%[email protected]>
>>>> >
>>>> > > For more options, visit this group at
>>>> > >http://groups.google.com/group/android-developers?hl=en
>>>> >
>>>> >
>>>>
>>>> --
>>>> 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]<android-developers%[email protected]>
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/android-developers?hl=en
>>>>
>>>
>>>  --
>>> 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]<android-developers%[email protected]>
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>>
>>
>>
>>
>> --
>> Dianne Hackborn
>> Android framework engineer
>> [email protected]
>>
>> 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 Developers" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]<android-developers%[email protected]>
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>  --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

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 Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to