android - Store 2 dimentional array in strings xml -


how store 2 dimensional array in strings.xml?

private string[][] children = {         { "arnold", "barry", "chuck", "david" },         { "ace", "bandit", "cha-cha", "deuce" },         { "fluffy", "snuggles" },         { "goldy", "bubbles" } }; 

your usage case answer question, because depending on situation, suggestion put individual strings in strings.xml , use int[][] inside class pointing string resources:

private final int[][] children = {     { r.string.arnold, r.string.barry, r.string.chuck, r.string.david },     { r.string.ace, r.string.bandit /*etc*/ }     // etc     // ... }; 

i know doesn't directly answer question how in xml, unless provide usage case makes clear it's necessary that, there's no reason harder i've described.


Comments