How to disable / remove Android activity shortcut and label bar?

Is there a way to remove the activity shortcut and the shortcut itself, which is set by default to the application label? I would like to have the entire layout from my design and must remove the shortcut bar and shortcut that is in the TOP layout.

+52
android
Dec 08 '10 at
source share
12 answers

You can achieve this by setting the android:theme attribute in @android:style/Theme.NoTitleBar to your <activity> element in your AndroidManifest.xml as follows:

 <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> 
+98
Dec 08 '10 at 13:40
source share

I am not 100% sure, this is what you want, but if you are accessing the title bar (a small gray bar at the top), you can remove / configure it through the manifest.xml file ...

 <activity android:name=".activities.Main" android:theme="@android:style/Theme.NoTitleBar"> 
+10
Dec 08 '10 at 13:40
source share
 public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //set up notitle requestWindowFeature(Window.FEATURE_NO_TITLE); //set up full screen getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.main); } 
+10
Oct 24 '12 at 2:25
source share

If your application theme is AppTheme (or something else), then add the following code in styles.xml:

 <style name="HiddenTitleTheme" parent="AppTheme"> <item name="windowNoTitle">true</item> <item name="windowActionBar">false</item> </style> 

Then, in the manifest file, add the following to the activity tag for which you want to disable the activity shortcut:

 android:theme="@style/HiddenTitleTheme" 
+6
Oct 11 '15 at 10:15
source share

There is code here that does this.

The trick is in this line:

  title.setVisibility(View.GONE); 
+1
Dec 08 2018-10-12
source share

There is also a drop-down menu in the eclipse graphic layout window. some of the topics on this menu will have a ".NoTitleBar" at the end. any of them will do the trick.

+1
Apr 19 '13 at 2:37 on
source share

In my case, the remaining answers were not enough ...

 <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="android:windowNoTitle">true</item> <item name="android:windowFullscreen">true</item> </style> <application android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > </application> 

Tested on Android 4.0.3 API 15.

+1
Feb 08 '16 at 13:11
source share

Whenever I do rake run: android,

my Androidmenifest.xml file is built up again, so my changes are done

for NoTitlebar is no longer saved.

Instead of user adroid_title: 0

It helped me.

edit the build.yml file

 android:
   android_title: 0
   #rest of things 
   #you needed 
0
Aug 17 2018-11-11T00:
source share

This.

 android:theme="@style/android:Theme.NoTitleBar" 
0
Nov 28 '13 at 11:36
source share

You have two ways to hide the title bar by hiding it in a specific action or by hiding all actions in your application.

This can be done by creating a custom theme in styles.xml .

 <resources> <style name="MyTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style> </resources> 

If you use AppCompatActivity , there are many themes that Android currently supports. And if you choose a theme with .NoActionBar or .NoTitleBar . It will disable your action bar for your theme.

After setting up a custom theme, you can use the theme in your activities / actions. Go to the manifest and select the action on which you want to install the theme.

SPECIFIC ACTIVITIES

AndroidManifest.xml

 <application android:icon="@mipmap/ic_launcher" android:label="@string/app_name"> <activity android:name=".FirstActivity" android:label="@string/app_name" android:theme="@style/MyTheme"> </activity> </application> 

Please note that I installed the FirstActivity theme in MyTheme custom theme. Thus, the topic will be affected only by certain activities. If you do not want to hide the toolbar for all your activities, try this approach.

The second approach is where you set the topic for all your activities.

ALL ACTIVITIES

 <application android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/MyTheme"> <activity android:name=".FirstActivity" android:label="@string/app_name"> </activity> </application> 

Please note that I have installed the application theme in the custom MyTheme theme. Thus, the topic will be affected only in all activities. If you want to hide the toolbar for all your activities, then try using this approach.

0
Jul 26 '17 at 17:53 on
source share

using the toolbar you can solve this problem. use the setTitle method.

  Toolbar mToolbar = (Toolbar) findViewById(R.id.toolbar); mToolbar.setTitle(""); setSupportActionBar(mToolbar); 

super easy :)

-one
Jul 26 '17 at 16:43
source share

you can use this in your activity tag in AndroidManifest.xml to hide the shortcut

 android:label="" 
-2
Mar 17 '16 at 15:54
source share



All Articles