5
votes

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

1

1 Answers

0
votes
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);
}