This article describes in more detail the Android Activity full screen display implementation method. Share to everyone for your reference. The specific methods are as follows:
Method One:
Using the XML method, in the project's Androidmanifest.xml file, add attributes to the activity element that needs to be full-screen:
Copy Code code as follows:
Android:theme= "@android: Style/theme.notitlebar.fullscreen"
This will enable full screen display of the activity, if you just don't want the title bar, that is, you need to keep the system's own taskbar, then use:
Copy Code code as follows:
Android:theme= "@android: Style/theme.notitlebar"
The advantage is that you don't have to make changes in your code.
Method Two:
Even if you modify it with code
No title bar:
Copy Code code as follows:
Requestwindowfeature (Window.feature_no_title);
Fullscreen:
Copy Code code as follows:
GetWindow (). SetFlags (Windowmanager.layoutparams.flag_fullscreen,windowmanager.layoutparams.flag_fullscreen);
You can use code to dynamically make the activity full-screen, such as Full-screen screen after double-click.
I hope this article will help you with your Android program.