1. Are you ready for the Galaxy S20? Here is everything we know so far!

App short name

Discussion in 'Android Development' started by Greum, Jul 13, 2019.

  1. Greum

    Greum Well-Known Member
    Thread Starter

    I want to change the name that appears on an Android device along with the app's launcher icon, but without changing the app name (app_name in strings.xml). Can it be done? I found a thread on SO which was so contradictory as to be useless. For example, I have an app called Conveyancing Quoter, but I want to use just Quoter below the launcher icon but still have Conveyancing Quoter in the title bar.

    Is it android:label="@String/app_name" in AndroidManifest.xml that I want to change? I don't want to try it and get in a beggars muddle.
     


  2. Brian Berry

    Brian Berry Well-Known Member

    in the res/values folder there is a XML file called Strings App name can be changed there.
     
  3. Greum

    Greum Well-Known Member
    Thread Starter

    Isn't that going to change the name in the title bar as well?
     
  4. Brian Berry

    Brian Berry Well-Known Member

    Sorry I didn't bread that very well l. That will change the title bar. I remove the title bar in my apps to maximize screen. So sorry for the bad answer
     
    ocnbrze and Greum like this.
  5. Greum

    Greum Well-Known Member
    Thread Starter

    I think I have an answer but I've somehow screwed up my app key and can't publish my updated app to check! :rolleyes:
     
  6. Greum

    Greum Well-Known Member
    Thread Starter

    I thought I had an answer, but it doesn't change anything.

    Code (Text):
    1.     <application
    2.         android:allowBackup="true"
    3.         android:icon="@mipmap/ic_launcher"
    4.         android:label="@string/app_name"
    5.         android:roundIcon="@mipmap/ic_launcher_round"
    6.         android:supportsRtl="true"
    7.         android:theme="@style/AppTheme">
    8.         <activity
    9.             android:name=".MainActivity"
    10.             android:label="@string/app_long_name">
    11.             <intent-filter>
    12.                 <action android:name="android.intent.action.MAIN" />
    13.  
    14.                 <category android:name="android.intent.category.LAUNCHER" />
    15.             </intent-filter>
    16.         </activity>
    17.     </application>
    I added app_long_name and changed app_name to my new shorter name, but I guess I'm missing something.
     
  7. hasral

    hasral Lurker

  8. Greum

    Greum Well-Known Member
    Thread Starter

    Thanks, I've already done that. The app wouldn't compile otherwise.
     
  9. GameTheory

    GameTheory Android Expert

    You can use a custom ToolBar. Then add the long name to the toolbar and the short name as your app name.
     
    Greum likes this.
Loading...

Share This Page

Loading...