views:

398

answers:

1

When my app starts, the title bar is hidden. However, if I leave the app and then return (minimize or phone goes to sleep), there is a blank bar inserted at the top. Is this an intentional feature? How can I prevent it? It seems that the bar goes away after I press the menu key.

This is the relevant line in the manifest file:

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

Thanks

A: 
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
    WindowManager.LayoutParams.FLAG_FULLSCREEN);        

    setContentView(R.layout.main);
}
JoaquinG
That didn't seem to resolve the issue. The problem only occurs when I override the onMeasure function in my view:public void onMeasure(int widthMeasureSpec, int heightMeasureSpec){ super.onMeasure(widthMeasureSpec, heightMeasureSpec); width = MeasureSpec.getSize(widthMeasureSpec); height = MeasureSpec.getSize(heightMeasureSpec)-50; setMeasuredDimension(width,height); }
kasplurpo