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

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -