Sign up ×
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute:

This question already has an answer here:

How I can use Android string array in xml for Initialization I want get Email: text of array

 <string-array name="detalis">
    <item >Wanted</item>
    <item >Company:</item>
    <item >Event</item>
    <item >Vacancy:</item>
    <item >Position:</item>
    <item >Race:</item>
    <item >Gender:</item>
    <item >Age:</item>
    <item >Jobscope:</item>
    <item >Venue:</item>
    <item >Date:</item>
    <item >Time:</item>
    <item >Break:</item>
    <item >Pay: </item>
    <item >Uniform:</item>
    <item >Transport: </item>
    <item >Standby area:</item>
    <item >Food:</item>
    <item >Interview:</item>
    <item >Requirements:</item>
    <item >Training:</item>
    <item >Client:</item>
    <item >Foreigners:</item>
    <item >Clients Contact:</item>
    <item >Phone: </item>
    <item >Email:</item>
    <item >Subject:</item>
</string-array>

I do that,but error

<TextView
    android:id="@+id/TextView02"
    android:text="@array/detalis"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:textSize="15sp" />`

Please help me.

share|improve this question

marked as duplicate by Rajesh, Louis, laalto, TGMCians, Hamid Shatu Apr 8 '14 at 14:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 1 down vote accepted

its not possible to reference an individual string from an array. One work around would be to separate the array into strings and then build the array from those strings.

<string name="details_email">Email:</string>
<string name="details_subject">Subject:</string>

<string-array name="details">
    <item >@string/details_email</item>
    <item >@string/details_subject</item>
</string-array>`

That way you can still have your array and reference individual strings

share|improve this answer
    
Thanks for help – Artur Hakobyan Aug 5 '13 at 8:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.