-
-
Notifications
You must be signed in to change notification settings - Fork 9
SimpleDropDownPreference
Marc Auberer edited this page Jan 17, 2021
·
4 revisions
Equivalent of the DropDownPreference
xml tag.
In your code:
SimpleSettings(this).show {
TextPref {
title = "Title"
simpleSummaryProvider = true
entries = listOf("Apple", "Banana", "Avocado", "Pineapple")
...
}
}
In a seperate xml file:
<PreferenceScreen
xmlns:app="http://schemas.android.com/apk/res-auto">
<DropDownPreference
app:key="key"
app:title="Title"
app:entries="@array/fruits"
app:entryValues="@array/fruits_values"
app:defaultValue="3"
app:useSimpleSummaryProvider="true"
... />
</PreferenceScreen>
© Marc Auberer 2020-2023