How to put the name that appears on the icon of the application

1

When I create an application the icon of this application that appears on the desktop shows a different name than the one I have in the strings.xml

<string name="app_name">Nombre UNO</string>

I have a different one on the menu bar.

<string name="titulo_app">Nombre DOS</string>

Well, when I create the apk, the name that appears in the icon is the one I have in the Toolbar .

I do not know if it's because I have created two Classes and the two have a strings.xml , but in the second I only have one in "Name ONE"

How can I change the name of the icon?

Thank you.

    
asked by SoCu 08.01.2018 в 19:59
source

2 answers

2

You should check within your file AndroidManifest.xml where it takes the label that assigns the name, it is usually taken from strings.xml with the entry app_name :

<application
     android:label="@string/app_name"

but in your case it is possibly taking the name of another entry or file and even this directly defined the name of the application:

 <application
      android:label="mi aplicacion"
    
answered by 08.01.2018 в 20:12
1

Change the name of the Activity in the strings.xml file in your values folder.

Since besides showing you the name of the app, there are also the titles of each of the activities, which are shown in the Toolbar.

Here the name of the app:

<string name="app_name">Mi_aplicacion</string>

And here the title of an activity:

 <string name="title_activity_main">Titulo_Toolbar</string>

I hope it's your help.

PS: (The value you have in "app_name" will be the name that will appear in the icon of the app, although sometimes, the name of the main activity of your application usually appears.)

    
answered by 08.01.2018 в 23:44