I'm writing my Android application with localization infrastructure. (Currently I have only one language beside English)
I have few settings that defined at xml and mapped fine to PreferenceActivity. But, when I'm changing the language the selected item is not appear as selected. Below example of one of the preferences:
<ListPreference android:key="duration" android:title="@string/detected_sound_duration" android:entries="@array/detected_durations" android:entryValues="@array/detected_durations" android:defaultValue="@string/medium"/>
To check the value I want to have generic solution like this:
switch (preferences.getString("duration", getResources().getString(R.string.medium)))
but since there is no selected item in the second language I caot even use this solution.
It's seems like I'm using wrong practice. There is any suggestion how to do it right?
Thanks!
