I have created an Activity and declared in Manifest file. But I would like to re-use the same Activity for other purpose.
<activity
android:configChanges="orientation|keyboardHidden"
android:label="Main Menu"
android:name=".MainMenu"
android:theme="@android:style/Theme.Light" >
</activity>
I need to change the Label dynamically. Thanks in Advance
In your Manifest file
Initially, your code was like this.
But after changes to add Labels.
is the optimum way to change the Label name.
courtesy.(ryanwaite28)
android:label="any word you want"/>
You can define the string in res/string.xml file and then add android:label to the AndroidMenifest.xml file
Use
or
Static, not Dynamic
Go to your AndroidManifest.xml file and add the android:label attribute to the activity tag you want, like this: