How can I set the value marked in ListPreference

I have some problems using ListPreference, when I set the value using ListPreference.setEntries () and ListPreference.setEntryValues ​​(), then the value was set, but it was not checked, I tried ListPreference.setEnabled (true) and ListPreference .setSelectable (true), but it was about ListPreference, not the values ​​in the ListPreference, any method to make it checked by encoding after I set the value?

thank

+3
source share
1 answer

By default selected item in listPreference, usesetValueIndex

+10

Source: https://habr.com/ru/post/1778718/


All Articles