Android can be set to full screen in two ways.
The first is:
This. requestwindowfeature (window. feature_no_title); // cancel the status bar this. getwindow (). setflags (windowmanager. layoutparams. flag_fullscreen, windowmanager. layoutparams. flag_fullscreen );
The second type is:
Create a theme. xml file in the Res/values directory (this file is mainly used for style placement). The file content is as follows:
<? XML version = "1.0" encoding = "UTF-8"?> <Resources> <! -- Name is the name of the style, and parent inherits the parent style --> <style name = "theme_fullscreen" parent = "Android: theme. black "> <item name =" Android: windownotitle "> true </item> <! -- Set no title --> <item name = "Android: windowfullscreen">? Android: windownotitle </item> <! -- Whether to fill in the slow screen and reference the Android: windownotitle value --> </style> </resources>
Second, remember to reference it in androidmanifest. xml.
<Activity Android: Name = ". loginactivity" Android: theme = "@ style/theme_fullscreen"/>
So OK ~!