简体   繁体   中英

Android string-array itemm

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>

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>

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM