Android studio remove app name

Remove Android App Title Bar

I understand that these properties in the manifest:

can remove the title bar. However, I constantly check the Graphical Layout when I am modifying my app. When I look at the Graphical Layout I still see the title bar. I want to remove the title bar in a way that I don’t have to see it during the development of the game.

17 Answers 17

Simple way is to put this in your onCreate() :

In the Design Tab, click on the AppTheme Button

Choose the option «AppCompat.Light.NoActionBar»

Place this after

This worked for me.try this

I was able to do this for Android 2.1 devices and above using an App Compatibility library theme applied to the app element in the manifest:

Note: You will need to include the com.android.support:appcompat-v7 library in your build.gradle file

There are two options I’d like to present:

  1. Change the visibility of the SupportActionBar in JAVA code
  2. Choose another Style in your project’s style.xml

1: Add getSupportActionBar().hide(); to your onCreate method.

2: Another option is to change the style of your Application. Check out the styles.xml in «app->res->values» and change

If you use AppCompat v7, v21

Use this to remove title from android app in your Androidmainfest.xml

or you can use this in your activity

If you have import android.support.v7.app.ActionBarActivity; and your class extends ActionBarActivity then use this in your OnCreate :

In the graphical editor, make sure you have chosen your theme at the top.

It’s obvious, but the App Theme selection in design is just for display a draft during layout edition, is not related to real app looking in cell phone.

Just change the manifest file ( AndroidManifest.xml ) is not enough because the style need to be predefined is styles.xml . Also is useless change the layout files.

All proposed solution in Java or Kotlin has failed for me. Some of them crash the app. And if one never (like me) uses the title bar in app, the static solution is cleaner.

For me the only solution that works in 2019 (Android Studio 3.4.1) is:

Источник

Android — How to remove app name from ActionBar

Now i want to remove the app name from my ActionBar.
I want it like this:

7 Answers 7

Or you can just call actionbar.setTitle(«»)

Call setDisplayShowHomeEnabled() and setDisplayShowTitleEnabled() on ActionBar, which you get via a call to getActionBar().

If you want to hide it use this code

or if you want to change the name use this

Читайте также:  Андроид навигатор без карты

I’ve seen some questions about the location etc. Here is the complete solution. Use this in onCreate();

For Android 4.2.1 edit the default theme NoActionnBar and add this code in MainActivity.java file

You could try setTitle(«») . If you are using ActionBar or ToolBar , then call bar.setTitle(«») or :

Just write this:

Not the answer you’re looking for? Browse other questions tagged android android-actionbar or ask your own question.

Linked

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2021.12.3.40888

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

How do I remove the title bar from my app?

In my app there is this title bar at the top where the overflow menu would be, but I don’t need settings and only have one screen. When I change the theme like described in many other questions I get the old 2.2 theme. I want to have the modern theme just without the bar at the top.

26 Answers 26

Go to styles.xml and change .DarkActionBar for .NoActionBar

if colors are irrelevant to your app, you can actually go for

Just simply put getSupportActionBar().hide(); between super.onCreate and setContentView method.

you can change name=»———«

find android:theme=»@style/AppTheme» chang to android:theme=»@style/no_title»

click select Theme on menubar (it’s green color near MainActivity)

  • click project Theme
  • click no_title (on you right hand Side)
  • click OK

delete the following from activity_main.xml

do this in you manifest file:

in onCreate() works!

Try changing styles to NoActionBar if that doesn’t works add this code to your main activity

This works for me i hope this work for you as well

In Kotlin, this is how to do.

Best way is to use actionbar function setTitle() if you wish to show logo or have some other stuff in you actionBar but dont want to see name of the app, write this code in MainActivity.java or anywhere you wish to hide title in onCreate :

This way your app won’t have reason to crash.

Just use setTitle(null) above

The title will disappear then you can use the logo of your choice.

The easiest way: Just double click on this button and choose «NoTitleBar» 😉

I have faced the same problem as you, and solve this problem just by changing the class which I extended.

Источник

How to change an Android app’s name?

Is there a way to change the name (Launcher App Label) of an app without creating a new project?

Note: Name of the App and The label shown on the Launcher Icon on Home Screen on Mobiles can be different.

Example: On the home page in my Mobile where my apps are, I have an icon and the name Foo, but I want to change the name to Bar. Can I do this?

Читайте также:  Андроид настройка сенсорных кнопок

20 Answers 20

Yes you can. By changing the android:label field in your application node in AndroidManifest.xml .

Note: If you have added a Splash Screen and added

to your Splash Screen, then the Launcher Icon name will be changed to the name of your Splash Screen Class name.

Please make sure that you change label:

in your Splash Screen activity in your strings.xml file. It can be found in Res -> Values -> strings.xml

There’s the android:label for the application, and the android:label for the launch activity. The former is what you see under Settings -> Applications -> Manage Applications on your device. The latter is what you see under Applications, and by extension in any shortcut to your application, e.g.

This is a simple thing in Android Studio,

go to: res folder -> values -> strings.xml

change the app_name (in the bellow example:MitsuhoSdn Bhd) to any new name you want.

I noticed there are some differences in how the app name can turn up in Lollipop devices. Before Lollipop, you can have different app names with this:

In Lollipop, it will be like this:

In Lollipop, android:label in intent-filter is basically useless, while actionbar title and icon launcher is identical. So, if you want a different title in actionbar, you have no choice but to set dynamically

You might have to change the name of your main activity «android:label» also, as explained in Naming my application in android

It depends what you want to do. I personally wanted to rename my project so it didn’t say MainActivity at the top of the app and underneath the icon on my phone menu.

To do this I went into the Android Manifest.xml file and edited

And edited the android:name=».Mynewname» and then edited the string title_activity_main in the strings.xml file to match the name.

Hope that helps!

if you want to change app name under launcher icon then change this android:label=»@string/app_name» inside your Main Launcher activity tag

And if you want to change app name inside

Settings -> Application manager -> downloaded

where you have all installed applications then change this android:label=»@string/app_name» inside application tag

To change the name of your Android application in Android Studio or Eclipse , you have to change the value of the property android:label defined inside the node in AndroidManifest.xml

by default the name of the application is referenced to a string defined in strings.xml file, for example:

so, we have to change the value inside the strings.xml file:

To change android app’s name , go to activity which is launcher activity and change its label like I have done above in my code.

Nevermind I found it. It can be done in the manifest file under application just set the android label. Was thrown off at first becasue it didn’t change my shortcut of the application’s name.

Читайте также:  The best applications android

follow the steps:(let I assuming you have chosen Android view) app>res>values>strings

If you’re using android studio an item is under your strings.xml

It’s better to change the name here because you might have used this string somewhere.Or maybe a library or something has used it.That’s it.Just build and run and you’ll get new name.Remember this won’t change the package name or anything else.

Edit the application tag in manifest file.

Change the label attribute and give the latest name over there.

  1. Go to Strings.xml file under values.
  2. Change the app_name tag to your app_name to want and it is all set, you will be able to see the name you change now.

Yes Of-course. Android Supports to change the name of the App before making build just like iOS (Build Configuration). You can change it by Modifying the Android manifest file for the project.

The change in Manifest file did not change the App name,

but changing the Label attribute in the MainLauncher did the trick for me .

Old question but also now relative to Xamarin Android development:

As Xamarin allows for attributes to be used for adding items into the manifest, you may need to open your MainActivity.cs file and change the Label tag to your application’s name:

Note: This attribute will override written android:label= tags in your manifest file as I found out whilst archiving the app ready for release so be sure to change this attribute too.

Источник

Как удалить строку заголовка в студии Android?

В моем приложении эта строка заголовка находится вверху, там, где должно быть дополнительное меню, но мне не нужны настройки, и у меня только один экран. Когда я меняю тему, как описано во многих других вопросах, я получаю старую тему 2.2. Я хочу иметь современную тему только без панели наверху.

Перейдите в styles.xml и измените его .DarkActionBar на .NoActionBar

если цвета не имеют отношения к вашему приложению, вы можете выбрать

В файле манифеста Изменить:

работает onCreate() при setContentView() вызове перед .

иначе он выйдет из строя

В файле styles.xml измените DarkActionBar на NoActionBar

Это работает для меня

В файле манифеста измените на это:

Это работало для меня при values/styles.xml добавлении элементов:

Перейдите в Project -> app -> main -> res -> values ​​-> styles.xml

Измените эту строку, если хотите удалить ее для каждого просмотра

если вы хотите сделать это только для одного представления, вы можете изменить его в своих данных манифеста. Заходим в Android -> манифесты -> AndroidManifest.xml. сделать следующее:

  1. Найдите представление, в котором вы хотите получить изменения этого типа
  2. Добавить android:theme=»»@style/Theme.AppCompat.NoActionBar»

вы можете изменить name = «———«

найти android: theme = «@ style / AppTheme» измененный на android: theme = «@ style / no_title»

нажмите выбрать тему в строке меню (зеленый цвет рядом с MainActivity)

  • нажмите тема проекта
  • щелкните no_title (справа от вас)
  • нажмите ОК

Источник

Оцените статью