ListPreferences not displaying
i have a listpreference that does not display the choices. a box with the
correct number of slots appears. but the options are not in the slots. i
tried changing the theme. did not help. i tried adding and removing the
default value attribute. that did not help. i tried using the set Default
Value method. that did not help. i did this by the book and spent over a
day on it. any ideas?
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.options);
//PreferenceManager.setDefaultValues(getApplicationContext(),R.xml.options,
//false);
}
<ListPreference
android:title="@string/opt_cuisine_title"
android:summary="@string/opt_cuisine_summary"
android:defaultValue="Chinese"
android:entries="@array/cuisine_preferences_array"
android:entryValues="@array/cuisine_preferences"
android:order="3"
android:key="list"
/>
<string-array name="cuisine_preferences" >
<item name="Israeli">Israeli</item>
<item name="Thai">Thai</item>
<item>Italian</item>
<item>French</item>
<item>Other</item>
</string-array>
</integer-array>
<activity android:name=".Options"
android:label="@string/options_header"
>
</activity>
No comments:
Post a Comment