Android hidden title bar returns

When my application starts, the title bar is hidden. However, if I leave the application and then return (minimize or the phone goes into sleep mode), there is an empty bar at the top. Is this an intentional function? How can I prevent this? It seems that the bar goes away after pressing the menu key.

This is the corresponding line in the manifest file:

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

thank

+5
source share
1 answer
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);
}
0
source

All Articles