In the process of application development, some applications need to be displayed in full screen and the status bar is not often displayed. The status bar can be pulled down to display and then automatically hidden.
First the renderings
The interface is displayed in full screen. The status bar is not always displayed by default. The status bar appears only after the status bar is pulled down. It is automatically hidden if there is no action.
This effect is very simple. You only need to add the following two lines of code when the activity is created (oncreate) to solve the problem.
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
example: