Instead of doing it during creation, declare it in your manifest's activity
tag:

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

On Sat, Aug 14, 2010 at 6:55 PM, Peter Eastman <[email protected]>wrote:

> I'm writing an Activity that should take up the entire screen.  I
> therefore call
>
> requestWindowFeature(Window.FEATURE_NO_TITLE);
> getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
> WindowManager.LayoutParams.FLAG_FULLSCREEN);
>
> at the beginning of onCreate().  But it doesn't work correctly.  What
> happens is that the window title and notification bar are both visible
> for just a moment when the activity starts up.  Then they slide off,
> leaving my activity with a messed up layout: a blank space the size of
> the notification bar gets left at the top of the screen, and a little
> bit of my layout gets cut off at the bottom of the screen.  It appears
> that it's laid out the activity the size of the full screen, but then
> pushed it down a bit so part of it gets cut off.
>
> If I remove either one of the two lines above, everything works
> correctly and nothing gets cut off.  But then I have a title bar or
> notification bar at the top of the screen, which I don't want.
>
> I'm sure I must be missing something simple, but I've had no success
> figuring out what.
>
> Peter
>
> --
> 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