How to not display the name of the Android application on every screen

I find that in my Android app the app name is displayed at the top of each screen, consuming a line of valuable screen real estate.

I am using LinearLayouts

How can I make it not display?

+6
source share
4 answers

You can set it in Activity / Application tags in the XML manifest:

android:theme="@android:style/Theme.NoTitleBar" 

Read more here ( Styles and Themes ).

+11
source

Or write in onCreate yours Activity before setContentView ():

requestWindowFeature (Window.FEATURE_NO_TITLE);

+6
source
  <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"> <activity android:name=".A" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> 

you can add this line android: theme = "@android: style / Theme.Black.NoTitleBar.Fullscreen" to the manifest and make your application full-screen and without a title, and if you want to remove only the title bar and do not want the application to be fully displayed, you can use Theme.NoTitleBar

+3
source

Change the subject of your activity in this way

 <activity android:name=".Activity" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> 
+2
source

Source: https://habr.com/ru/post/910456/


All Articles