开发者

Android Customize Row in ListPreference

开发者 https://www.devze.com 2023-01-10 10:45 出处:网络
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 (de开发者_如何转开发scription) show

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 (de开发者_如何转开发scription) 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);


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


please see this topic: custom row in a listPreference?

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

0

精彩评论

暂无评论...
验证码 换一张
取 消