Hi there!

I am using the fullscreen mode in my application and noticed a small,
but very annoying bug. After hours of testing I tracked it down to a
very simple piece of code (see below).

This is how the UI looks like after running it:
http://i47.tinypic.com/2jfac6v.png

The problem: As soon as the button is selected, a header in the size
of the status bar will appear and all views will be scrolled down by
the appropriate height.

My code looks like this:

-----snip-----

package com.example.android.test;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.LinearLayout;

public class FullscreenTest extends Activity {

        @Override
        protected void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);

                // set background color to white to see what is going on
                
getWindow().setBackgroundDrawableResource(android.R.color.white);

                // hide title and status bar
                getWindow().requestFeature(Window.FEATURE_NO_TITLE);
                this.getWindow().setFlags
(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN );


                // create a simple layout with a button
                LinearLayout contentView = new LinearLayout(this);

                Button button = new Button(this);
                button.setText("Look above!   WTF?");

                contentView.addView(button);

                setContentView(contentView);
        }

}

-----snap-----

The problem does not occur if the status bar or the title bar is
shown. As far as I tested, all SDK versions 1.5, 1.6 and 2.0.1 are
affected.

Can anyone verify this problem? Is this fixed in feature versions of
the Android SDK (e.g. 2.1)?


Thanks in advance & regards

Marc Reichelt   ||   http://www.marcreichelt.de/
-- 
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