I faced the following problem: there is the string resource which contains URL:
<string name="msg_more_information_about_credit"><![CDATA[<b>Ejemplo TAE:</b> 300€ a 62 días. <b>Coste préstamo:</b> 148€. <b>Total a devolver:</b> 448€. TAE 2035%. <a href="https://www.moneyman.es/secci.php?pers=0.011&tae=3112.64&back=290&back_date=22.11.2020¤t_time=30¤t_sum=290&is62=false">Más Información </a> ]]></string>
I need to make this link dynamic (pass values to it from code). For this purpose, I modified it a bit:
<string name="msg_more_information_about_credit"><![CDATA[<b>Ejemplo TAE:</b> 300€ a 62 días. <b>Coste préstamo:</b> 148€. <b>Total a devolver:</b> 448€. TAE 2035%. <a href="https://www.moneyman.es/secci.php?pers=0.011&tae=3112.64&back=290&back_date=%1$s¤t_time=30¤t_sum=290&is62=false">Más Información </a> ]]></string>
And then I tried to get resources as usual, when string contains other strings:
getString(R.string.msg_more_information_about_credit, "22.11.2020")
But in this case the link doesn't have my set value, but contains "%1$s"
So, my question is, how can I modify the link from code? Thanks in advance!
formatted="false"to your string resource? stackoverflow.com/a/12627660formatted="false", but resut is the sameString.format(getString(..), "22.11.2020")?