One, set in code
public void OnCreate (Bundle savedinstancestate) {super.oncreate (savedinstancestate);//Remove title Requestwindowfeature ( Window.feature_no_title); Remove the status bar above activity GetWindow (). SetFlags (Windowmanager.layoutparams. Flag_fullscreen, Windowmanager.layoutparams. Flag_fullscreen); Setcontentview (R.layout.main); }
Or
Requestwindowfeature (Window.feature_custom_title); GetWindow (). Setfeatureint (Window.feature_custom_title, r.layout.custom_title_1);
R.layout.custom_title_1, this is your title. File layout
Second, modify in the configuration file
(Key code: Android:theme= "@android: Style/theme.notitlebar.fullscreen", if you want to just remove the title bar on the back without adding fullscreen, in addition, If you want the entire app to remove the title bar and the status bar, add this code to <application. In the tag, if you just want an activity to work, the code is added to the corresponding activity):
To hide the title bar you need to use a predefined style: Android:theme= "@android: Style/theme.notitlebar".
Hide the status bar: Android:theme= "@android: Style/theme.notitlebar.fullscreen". Here I also want to explain, with the former after our application run, you will see a short status bar, and then the full screen, and the second method is not the case, so I recommend you use the latter!
Tle_1, this is your title. File layout
Second, modify in the configuration file
(Key code: Android:theme= "@android: Style/theme.notitlebar.fullscreen", if you want to just remove the title bar on the back without adding fullscreen, in addition, If you want the entire app to remove the title bar and the status bar, add this code to <application. In the tag, if you just want an activity to work, the code is added to the corresponding activity):
To hide the title bar you need to use a predefined style: Android:theme= "@android: Style/theme.notitlebar".
Hide the status bar: Android:theme= "@android: Style/theme.notitlebar.fullscreen". Here I also want to explain, with the former after our application run, you will see a short status bar, and then the full screen, and the second method is not the case, so I recommend you use the latter!
Android activity removes title bar and status bar