Question: This is my menu\_items.xml whose elements are shown in a listview. They are Black coloured by default. I want them to be white. How can in change the color of these string-array items?
Below is my menu\_items.xml code.

```
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string-array name="menu_items" >
        <item >Demo Mode</item>
        <item >Inbox</item>
        <item >Sent Items</item>
        <item >Filing History</item>
    </string-array>
</resources>   

```

Answer: 
Have your string items as :

```
   <string-array name="menu_items" >
        <item >Demo Mode</item>
        <item >Inbox</item>
        <item >Sent Items</item>
        <item >Filing History</item>
    </string-array>

   <string-array name="menu_items_labels" >
        <item ><FONT COLOR="#006600"><b>Demo Mode</b></FONT></item>
        <item ><FONT COLOR="#006600"><b>Inbox</b></FONT></item>
        <item ><FONT COLOR="#006600"><b>Sent Items</b></FONT></item>
        <item ><FONT COLOR="#006600"><b>Filing History</b></FONT></item>
      </string-array>

```

In your spinner code - use:

```
// For setting the html code "menu_items_labels" with font color white
Spinner spinner = (Spinner) findViewById(R.id.my_spinner);
spinner.setAdapter(
      new ArrayAdapter<CharSequence>(this, 
         R.layout.multiline_spinner_dropdown_item, 
        myActivity.this.getResources().getTextArray(R.array.menu_items_labels)));

```

To retrieve the String value (Without HTML Formatting),

```
strTemp = getResources().getStringArray(R.array.menu_items)[spinner.getSelectedItemPosition()];

```
You can not directly tell the (array) resource which color it should have. You either can define an app-wide theme/style to use for list items or create an Adapter with custom view, in your case an [ArrayAdapter](http://developer.android.com/reference/android/widget/ArrayAdapter.html) will fit best. 

[Hot to create an ArrayAdapter with a custom view.](https://www.google.at/?q=android+arrayadapter+custom+view)