Question

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);
Was it helpful?

Solution

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

OTHER TIPS

please see this topic: custom row in a listPreference?

but there is a problem that i see,selecting radioButton noting Work!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top