开发者

how can i set the value checked in ListPreference

开发者 https://www.devze.com 2023-01-29 05:49 出处:网络
I have some problems with using ListPreference, when i set the value with useing开发者_开发百科 ListPreference.setEntries() and ListPreference.setEntryValues() , thenthe value wasset ,but is was not c

I have some problems with using ListPreference, when i set the value with useing开发者_开发百科 ListPreference.setEntries() and ListPreference.setEntryValues() , then the value was set ,but is was not checked , i tried the ListPreference.setEnabled(true) and ListPreference.setSelectable(true), but it was about the ListPreference , not the values in ListPreference, any method to make it checked with coding after i set the value?

thanks


To default the selected item in a listPreference, use setValueIndex

0

精彩评论

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

关注公众号