During the Android UI design, we often need to set the screen to no title bar or full screen. It is also very easy to implement. There are two main methods: Configuring the xml file and writing the code settings.
1. Configure in the xml file in the configuration file AndroidManifest. xml of the project, find the Activity that needs to be full screen or set to no title bar, and configure the Activity as follows.
Achieve full screen effect
Android: theme = "@ android: style/Theme. NoTitleBar. Fullscreen"
Implement no title bar
(But there is a built-in taskbar)
Android: theme = "@ android: style/Theme. NoTitleBar"
2. compile Java code settings and write code in the program. You only need to add the following code to the onCreate () method.
Achieve full screen effect
GetWindow (). setFlags (WindowManager. LayoutParams. FLAG_FULLSCREEN, WindowManager. LayoutParams. FLAG_FULLSCREEN );
Implement no title bar
(But there is a built-in taskbar)
RequestWindowFeature (Window. FEATURE_NO_TITLE );