Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to set different label for launcher rather than activity title?
    primarykey
    data
    text
    <p>This question has been asked before - but with no satisfying answer at all! So I'm trying it again.</p> <p>I want to give my application launcher icon (the one that is displayed on the startscreen!) a different, shorter caption. It seems the launcher takes its label from the mainfest section about the main activity's label, as here:</p> <pre><code>&lt;activity android:name="MainActivity" android:label="@string/app_short_name"&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; </code></pre> <p></p> <p>I already changed the original reference to my app's name @string/app_name to a different, shorter string resource here.</p> <p>BUT - big <strong>BUT</strong>: this also of course changes this activity's default title! And I did not want that to happen, there's enough space for a long application name! Setting the long title again in <code>onCreate</code> using the <code>setTitle(int)</code> method does no good either, because the short name will be visible to the user for a short time, but long enough to notice!</p> <p>And - please don't answer my question by refering to a custom titlebar... I do not want to go that long way, just because of a stupid string title! It's a pain to draw a custom title bar for so little effect!</p> <p>Is there <strong>no easy way</strong> to just give the launcher a different string to display? Thanks for your answers!</p> <p><strong>Edit:</strong> One more reason why having a custom titlebar is a pain is that it will not look like the default titlebar, I would have to explicitly do things to make it look alike on each device! And that can't be a solution if, after all, I don't want a different appearance!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload