0

I have string resource with href like this:

<string name="name">Some text <a href="http://SUBDOMAIN.domain.com/">Click here</a>. (SUBDOMAIN here is placeholder to show case)

I generated in SUBDOMAIN with product flavors:

productFlavors {
    dev {
        resValue "string", "sub_domain", "test."
    }
    ...
}

I have it in gradleResValues:<string name="sub_domain" translatable="false">test.</string>

I can not figure out how to use this sub_domain in my resource with href

  • https://stackoverflow.com/questions/3656371/is-it-possible-to-have-placeholders-in-strings-xml-for-runtime-values – laalto May 06 '22 at 07:45
  • I couldn't make it work inside `"` for `href`. If I escape it there is error: `Attribute value expected` and if I don't anything in those quotes is treated as string and is not parsed/resolved. – mikolaj.a.wozniak May 06 '22 at 09:32

0 Answers0