views:

224

answers:

1

Is there a way to use a custom row for the ListPreference in the Android preference screen?

Currently I populate the ListPreference like this, but I need more info (description) shown in the List

int count = items.size();
CharSequence[] entries = new CharSequence[count];
CharSequence[] entryValues = new CharSequence[count];

for (int i = 0; i < count; i++) {
    entries[i] = items.get(i).toString();
    entryValues[i] = String.valueOf(i);
}

langPref.setEntries(entries);
langPref.setEntryValues(entryValues);
A: 

I found that the List Preference does not have the ability to do this.

BahaiResearch.com