Is it possible to change ApplicationLabel in code ?
Thanks
Thanks
See the attached
ChangeAttribute ("#ApplicationLabel","Bonjour")
<string name="app_name">MyApp</string>
<string name="app_name">MeineApp</string>
SetApplicationAttribute(android:label,"$LABEL$")
SetApplicationAttribute(android:label,"@strings/app_name")
Hi!
you can add a strings.xml file in the res/values folder and put your default app-name there.
B4X:<string name="app_name">MyApp</string>
and set the file to read only. for lets say, german translation create a folder named values-de in the res folder, place a strings.xml file with:
and set it to read only.B4X:<string name="app_name">MeineApp</string>
In the manifest editor search for the following code:
and replace it byB4X:SetApplicationAttribute(android:label,"$LABEL$")
B4X:SetApplicationAttribute(android:label,"@strings/app_name")
I hope i wrote it correct, at the time I have no acess to my PC, it was written from my memory..
Edit: This works as well with other strings/names in the manifest editor (eg name of shortcuts, dream services etc..)
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="app_name">Messerae+</string>
</resources>