0

I want to get a string array from other file than strings.xml, because I want my project to be organised.

For example, I have this code:

String[] column1 = getResources().getStringArray(R.array.column1);

But my string array isn't located in strings.xml, but in \res\values\tables\10.xml

How can I get the string array from that file?

Thanks in advance.

2
  • Read about Json objects, XML parsing is too old. you need bring yourself to present Commented Feb 25, 2015 at 18:29
  • get the string from such a file like this String string = getString(R.string.hello); Commented Feb 25, 2015 at 18:32

1 Answer 1

2

Your XML files can have arbitrary names, but they need to be located in the values folder. I suggest just calling your file tables10.xml.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.