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>
  • You should post some code showing what you're doing currently, and what's going wrong. See https://stackoverflow.com/help/how-to-ask – Paul Thompson Jul 03 '18 at 01:15

2 Answers2

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>
Pablo DbSys
  • 532
  • 1
  • 7
  • 17
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.

Kartik
  • 7,677
  • 4
  • 28
  • 50