Shared-preference always returns default value
<p>I've got my shared preference's setup so it uses 2 arrays. All my ListPreference works except one which uses a different android:entryValues.</p>

<p>I've searched high and low to try and find out how to recall android:entryValues but can't find anything specific to this problem.</p>

<p>When I use the key name it crashes.</p>

<p>Heres the code;</p>

<p>XML Preferences.</p>

<pre><code>&lt;ListPreference
    android:title="Item Size"
    android:summary="Set the item size."
    android:key="itemSize"
    android:defaultValue="Medium"
    android:entries="@array/itemSize"
    android:entryValues="@array/itemSizeNumbers"
/&gt;
</code></pre>

<p>XML Values</p>

<pre><code>&lt;string-array name="itemSize"&gt;
    &lt;item&gt;Small&lt;/item&gt;
    &lt;item&gt;Medium&lt;/item&gt;
    &lt;item&gt;Large&lt;/item&gt;
&lt;/string-array&gt;
&lt;string-array name="itemSizeNumbers"&gt;
    &lt;item&gt;8&lt;/item&gt;
    &lt;item&gt;12&lt;/item&gt;
    &lt;item&gt;18&lt;/item&gt;
&lt;/string-array&gt;
</code></pre>

<p>The _items_screen_percentage always returns 12 no matter what.</p>

<pre><code>this._items_screen_percentage = this.prefs.getInt("itemSizeNumbers", 12);
Log.w("Item Size",Integer.toString(this._items_screen_percentage));
</code></pre>

<p>Does anyone know of an easy way to get EntryValues from shared preferences?</p>
