Skip to content

SimpleInputPreference

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

Equivalent of the EditTextPreference xml tag.

Usage

In your code:

SimpleSettings(this).show {
	InputPref {
		title = "Title"
		summary = "Summary"
		defaultValue = "Default text"
		...
	}
}

In a seperate xml file:

<PreferenceScreen
    xmlns:app="http://schemas.android.com/apk/res-auto">
	
	<EditTextPreference
    	app:key="key"
    	app:title="Title"
    	app:summary="Summary"
		defaultValue = "Default text"
		... />

</PreferenceScreen>