-3

The Android Activities name is to be changed. In which XML file can I find the attribute. I didn't find it in Activities corresponding XML file. Thank you.

istiaq2379
  • 113
  • 3
  • 13

4 Answers4

1

When You are adding an Activity in Androidmanifest.xml file you can set android:label="@string/app_name_main" for every activity.. For every activity you can set this.

For eg:

           <activity
            android:name="com.example.FirstActivity"
            android:label="@string/app_name"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />

            <activity
            android:name="com.example.SecondActivity"
            android:label="@string/app_name2"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />

            <activity
            android:name="com.example.ThirdActivity"
             android:label="@string/app_name3"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />
Sabyasachi
  • 3,499
  • 2
  • 14
  • 21
0

I think what you search for is:

setTitle("new name")
ligi
  • 39,001
  • 44
  • 144
  • 244
0

You can change the action bar title which looks like application label using below code.

getSupportActionBar().setTitle("Your title");

Each activity must extends ActionBarActivity/AppBarActivity/FragmentActivity to achieve this.

Viral Thakker
  • 547
  • 2
  • 10
0

I think you are asking for changing application label, which is not possible .Because it is a fixed string in the AndroidManifest.xml file which cannot be changed at run-time.

If you are looking for Activity title change, you can set the title of activity by calling 'setTitle("your_title")' in your Activity

Prasad
  • 3,462
  • 1
  • 23
  • 28