Android reference string in string.xml

You can give the reference of string resource, but limitation are as follows

<string name="first_name">Chrome</string>
<string name="application_name">@string/first_name</string> // gives "Chrome"
<string name="application_name">Chrome @string/first_name</string> // gives "Chrome @string/first_name"
<string name="application_name">@string/first_name Chrome </string> // gives error

If content starts with "@" then Android considers this is a referenced string, see last case which gives an error because Android's tools take @ and the next string to it as the string's reference name, it will try to find a resource called "@string/first_name Chrome" which doesn't exist.

You can use String Format to dynamically assign sub-strings like <string name="application_name">%1$s browser</string>

to use

String text = String.format(res.getString(R.string.application_name), "Chrome");

Yes, you can do so without having to add any Java/Kotlin code, using this small library that allows you to do so using XML only at buildtime. So for your case, you'd have to set up your strings like this:

<string name="application_name">${first_name} Browser</string>
<string name="first_name">Chrome</string>

And then after running the gradle plugin, you'll get this:

<!-- Auto generated during compilation -->
<string name="application_name">Chrome Browser</string>

This is the link to the library: https://github.com/LikeTheSalad/android-stem

Disclaimer: I'm the author of this library.