Skip to content

SimpleSeekbarPreference

Marc Auberer edited this page Jan 17, 2021 · 4 revisions

Equivalent of the SeekbarPreference xml tag.

Usage

In your code:

SimpleSettings(this).show {
	TextPref {
		title = "Title"
		summary = "Summary"
		min = 1
        max = 30
        defaultValue = 22
        showValue = true
		...
	}
}

In a seperate xml file:

<PreferenceScreen
    xmlns:app="http://schemas.android.com/apk/res-auto">
	
	<SeekbarPreference
    	app:key="key"
    	app:title="Title"
    	app:summary="Summary"
		app:min="1"
        android:max="30"
        app:showSeekBarValue="true"
        app:defaultValue="22"
		... />

</PreferenceScreen>