-2

How can I keep the name of my app the same, but change what the title of the main activity is called?

Caleb Kleveter
  • 11,170
  • 8
  • 62
  • 92
KrispyKreme
  • 39
  • 1
  • 8

4 Answers4

2

setTitle("Hello StackOverflow"); worked

KrispyKreme
  • 39
  • 1
  • 8
1

Just set android:label for each Activity on your AndroidManifest.xml

Juan Sánchez
  • 980
  • 2
  • 10
  • 26
0

use this

getActionBar().setTitle(title);
Kastriot Dreshaj
  • 1,121
  • 6
  • 16
0

If you want change the title at compile time you have to use android:label for each Activity on your AndroidManifest.xml. But if you want to change the title at runtime then you have to use getActionBar().setTitle("title");.

Biswajit
  • 1,829
  • 1
  • 18
  • 33