Without looking at the API, I checked the information on the Internet. Originally, requestwindowfeature was used to set full screen.
In Activity
This. requestwindowfeature (window. feature_no_title );
Getwindow. setflags (windowmanager. layoutparams. flag_fullscreen,
Windowmanager. layoutparams. flag_fullscreen );
/** You only need to setfullscreenmode (true); In j2_m3 **/
Example:
// Full screen
Public void setfullscreen (){
Requestwindowfeature (window. feature_no_title );
Getwindow (). setflags (windowmanager. layoutparams. flag_fullscreen,
Windowmanager. layoutparams. flag_fullscreen );
}
// No title
Public void setnotitle (){
Requestwindowfeature (window. feature_no_title );
}
**************************************** ********************************
note:
the preceding method is used in
activity. setcontent is called before View (); otherwise, it is invalid.