Concatenate multiple strings in XML?

前端 未结 10 1003
执笔经年
执笔经年 2020-12-01 05:09

I go through this How to concatenate multiple strings in android XML? and in the end there are comments that

For clarity, Its works:

&

10条回答
  •  温柔的废话
    2020-12-01 05:27

    No I don't think you can concatenate.

    aaa
    bbb @string/aaa
    

    Output - bbb @string/aaa

    If you do,

    aaa
    @string/aaa bbb  -> This won't work it
                                                          will give compilation error
    

    Because here it will search for a String with reference @string/aaa bbb which does not exists.

    Problem in your case was, you where using @strings/aaa which should be @string/aaa

提交回复
热议问题