1

Can l add same sting to string in resources like it's?

<string name="text_base">Same text</string>
<string name="text_base_my_text">@string/text_base + and new text</string>

Can l get string in text_base_my_text "Same text and new text"?

user2542715
  • 185
  • 2
  • 4
  • 10
  • http://stackoverflow.com/questions/4746058/reference-one-string-from-another-string-in-strings-xml – wtsang02 Jul 18 '13 at 15:59
  • http://stackoverflow.com/questions/10411699/concatenate-multiple-strings-in-xml. the way you are doing its not possible – Raghunandan Jul 18 '13 at 16:13

1 Answers1

0

yes you can <string name="Hor">@string/Cli</string> <string name="Cli">HOLA</string> in string.xml and you can see "HOLA" when you refer @string/Hor

if you a literal inside android understand that all is a literal. i mean:

<string name="text_base">Same</string> <string name="other">@string/text_base + new text </string> you will see @string/text_base + new text when you refer to @string/other

but if you put: <string name="text_base">Same</string> <string name="other">@string/text_base</string> when you refer to @string/other you will see Same

Alex Muni
  • 473
  • 5
  • 16