android - ListPreference with duplicate values -


i want display list of languages in settings preferences.

abkhaz afar ... english ... zulu 

i using listpreference this. languages sorted alphabetically that's long list want add 3 popular languages on top of list. means adding duplicate values in language list.

english ... abkhaz afar ... english ... zulu 

the problem cannot control entry selected when list displayed. if language 1 of 3 popular want entry on top of list selected not 1 in middle of alphabetical order.

mlistpreference.setentryvalues(r.array.languagecodes); mlistpreference.setentries(r.array.languages); mlistpreference.setvalueindex(1);  //does not work expected, item selected in middle of list 

is there solution problem?

have different entry values duplicate entries. in code these should mean same entry.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -