Normally activity windows are FILL_PARENT x FILL_PARENT, so they will fill
the entire screen.  If you want one that doesn't fill the screen, you should
set android:theme="@android:style/Theme.Dialog" in your manifest.

On Fri, Feb 27, 2009 at 5:24 PM, Dan Raaka <micromys...@gmail.com> wrote:

>
> I am trying to set an offset to the window created by the activity ..
> I am doing something like this ..
>
> public void onCreate(Bundle savedInstanceState) {
>
>   .....
>   Window w = this.getWindow();
>   w.setGravity(Gravity.BOTTOM); // window.lp says default gravity
> ignores x and y values
>   WindowManager.LayoutParams lp = w.getAttributes();
>   lp.y =100; // initial value is 0
>   w.setAttributes(lp);
>  ...
> }
>
> Now I am expecting the the window to be anchored at (x=0,y=100), but
> the activity takes the full screen, what am i missing here ?
>
>
>
>
>
> >
>


-- 
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.  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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to