1

Can we parse a array element and a value from a android array use in xml layouts.

<string-array name="country_arrays">

    <item>ABC</item>
    <item>DEF</item>
    <item>FHI</item>
    <item>JKL</item>

</string-array>

in this array we can parse only String values but I want to parse a id too attached to each strings. In HTML we can parse a value attribute with a HTML element. I don't know whether this can be done with Android but if it is possible it will reduce lot of work, please help me to correct this.

1 Answer 1

1

No it is impossible, but you can use id when you load array into you java code.

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.