Is it possible to access a string-array item in Android?

前端 未结 1 1855
[愿得一人]
[愿得一人] 2020-12-20 11:59

snip-code from values/string.xml:


    Today
    

        
1条回答
  •  Happy的楠姐
    2020-12-20 12:19

    See the selected answer here: Android - reference a string in a string array resource with xml.

    According to that answer, have to do something like this:

    Earth
    Moon
    
    
        @string/earth
        @string/moon
    
    

    Then you would simply do:

      

    0 讨论(0)
提交回复
热议问题