Option to set default option in SingleChoice preference
rosenpin opened this issue · comments
Tomer Rosenfeld commented
There should be a way to set a default value for the SingleChoice
preference, example could be
val styleOption = listOf(
SelectionItem(
Prefs.Keys.ListStyles.COMPACT,
"compact",
...
),
SelectionItem(
Prefs.Keys.ListStyles.STANDARD,
"standard",
...
),
)
singleChoice(..., styleOption) {
title = ...
summary = ...
icon = ...
default = Prefs.Keys.ListStyles.STANDARD
}
Tomer Rosenfeld commented
Already exists, use initalSelection
in SingleChoiceDialogPreference