Append string to activity's android:label
Is it possible to append a string to an activity's android:label attribute in the AndroidManifest.xml file, if I'm using a value from the string.xml file? I'd like to append my 开发者_高级运维app's name to each activity's title/label, ie:
<activity android:name=".Activity1" android:label="@string/app_name + "-" + Main Activity">
So the title/label of the activity would display as:
App Name - Main Activity
and another would be:
<activity android:name=".Activity2" android:label="@string/app_name + "-" + Another Activity">
Which would display as:
App Name - Another Activity
No, it is not possible. You will have to create those strings manually in your strings.xml file. You can't concatenate those strings in the strings.xml file either.
精彩评论