1

The name of my app is "[T]ime [T]racking [M]anager". Since that's too long at the homescreen (only "[T]ime [T]r..." is shown) I want my apps name to be "TTM" on the homescreen and app selection but I want the title of the app to be the full name. Like this: enter image description here

I tried to change my AndroidManifest like this:

 <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="TTM" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity" android:label="[T]ime [T]racking [M]anager"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> 

But now the name is everywhere (on homescreen AND title of the app) "[T]ime [T]racking [M]anager". How can I name them differently?

4
  • u want the app name on menu screen of phone as TTM but on HomeScreen u want as full form? right? Commented Jan 16, 2020 at 11:51
  • depending on what you are using : stackoverflow.com/questions/34118086 Commented Jan 16, 2020 at 11:51
  • u want full form on home Screen but TTM on all other activity screen??? Commented Jan 16, 2020 at 11:52
  • as shown in the screenshot, i want: TTM on homescreen and app selection. full name as app title Commented Jan 16, 2020 at 11:54

1 Answer 1

1

You have to set the Activity title programmatically like below:

public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); getSupportActionBar().setTitle("[T]ime [T]racking [M]anager"); } } 

And remove android:label from activity tag

<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="TTM" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.