android - Can I use 2 String resource in on same TextView in layout file? -
i have 2 string resouces
file:
<string name="label_1">dumb1</string> <string name="label_2">dumb2</string>
in textview
, want textview
shows static text: dumb1dumb2
. how in xml
layout file without define new string resouce
? can it? everyone!
sometimes, must use many static strings
such as: name:
, name
(and more such type of string). so, how avoid it? can define name
, :
, , set in xml
: name:
?
you can't have same "key" strings. use this:
<string name="label_1">dumb1</string> <string name="label_2">dumb2</string>
p.s. can reference string string using:
<string name="label_2">@string/label_1</string>
Comments
Post a Comment