0

I have a string-array. I need to select a string array resource from the following array.

<string-array name="ColorList">
    <item>
        <item>C01</item>
        <item>Rojo</item>
        <item>#D32F2F</item>
    </item>
    <item>
        <item>C02</item>
        <item>Polo</item>
        <item>#448AFF</item>
    </item>
</string-array>
1

2 Answers 2

0

Probably is better do a plural here is the link https://developer.android.com/guide/topics/resources/string-resource?hl=es-419

<?xml version="1.0" encoding="utf-8"?>
<resources>
<plurals
    name="plural_name">
    <item
        quantity=["zero" | "one" | "two" | "few" | "many" | "other"]
        >text_string</item>
</plurals>
</resources>
Sign up to request clarification or add additional context in comments.

Comments

0

This is not a valid format for a string-array. See this to find out how to implement it.

If you want nesting, you'll have to change it to a different format. See this.

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.