Reputation: 477
I wrote a PreferenceActivity, its setting.xml includes the following code:
<ListPreference
android:key="key"
android:title="@string/title"
android:entries="@array/entries"
android:entryValues="@array/values">
</ListPreference>
And I supply the following in array.xml
<array name="entries"><item>displayName</item></array>
<array name="values"><item>10240</item></array>
When the <item> is 10240, Android will throw NullPointerException. But when I changes it to 10240k, Android will work.Why?
Upvotes: 0
Views: 241