public class PreferenceScreenBuilder
public PreferenceScreenBuilder(@NotNull
android.content.Context context,
@NotNull
androidx.preference.PreferenceGroup rootScreen,
@NotNull
com.chibatching.kotpref.KotprefModel model)
public void dependsOn(@NotNull
androidx.preference.Preference $receiver,
@NotNull
androidx.preference.Preference preference)
Add dependency to other Preference
@NotNull
public androidx.preference.SwitchPreferenceCompat switch(@NotNull
kotlin.reflect.KProperty0<java.lang.Boolean> property,
@NotNull
java.lang.String title,
@Nullable
kotlin.jvm.functions.Function1<? super androidx.preference.SwitchPreferenceCompat,kotlin.Unit> options)
Create SwitchPreferenceCompat with provided property
@NotNull
public androidx.preference.CheckBoxPreference checkBox(@NotNull
kotlin.reflect.KProperty0<java.lang.Boolean> property,
@NotNull
java.lang.String title,
@Nullable
kotlin.jvm.functions.Function1<? super androidx.preference.CheckBoxPreference,kotlin.Unit> options)
Create CheckBoxPreference with provided property
@NotNull
public androidx.preference.EditTextPreference editText(@NotNull
kotlin.reflect.KProperty0<java.lang.String> property,
@NotNull
java.lang.String title,
@Nullable
kotlin.jvm.functions.Function1<? super androidx.preference.EditTextPreference,kotlin.Unit> options)
Create EditTextPreference with provided property
@NotNull
public androidx.preference.DropDownPreference dropDown(@NotNull
kotlin.reflect.KProperty0<java.lang.String> property,
@NotNull
java.lang.String title,
@Nullable
kotlin.jvm.functions.Function1<? super androidx.preference.DropDownPreference,kotlin.Unit> options)
Create DropDownPreference with provided property
@NotNull
public androidx.preference.ListPreference list(@NotNull
kotlin.reflect.KProperty0<java.lang.String> property,
@NotNull
java.lang.String title,
@Nullable
kotlin.jvm.functions.Function1<? super androidx.preference.ListPreference,kotlin.Unit> options)
Create ListPreference with provided property
@NotNull
public androidx.preference.MultiSelectListPreference multiSelectList(@NotNull
kotlin.reflect.KProperty0<? extends java.util.Set<java.lang.String>> property,
@NotNull
java.lang.String title,
@Nullable
kotlin.jvm.functions.Function1<? super androidx.preference.MultiSelectListPreference,kotlin.Unit> options)
Create MultiSelectListPreference with provided property
@NotNull
public androidx.preference.SeekBarPreference seekBar(@NotNull
kotlin.reflect.KProperty0<java.lang.Integer> property,
@NotNull
java.lang.String title,
@Nullable
kotlin.jvm.functions.Function1<? super androidx.preference.SeekBarPreference,kotlin.Unit> options)
Create SeekBarPreference with provided property
@NotNull
public androidx.preference.PreferenceCategory category(@NotNull
java.lang.String title,
@NotNull
kotlin.jvm.functions.Function1<? super com.chibatching.kotpref.preference.dsl.PreferenceScreenBuilder,kotlin.Unit> childBuilder)
Create PreferenceCategory
title - category titlechildBuilder - class PreferenceScreenBuilder to create Preference in this category@NotNull
public androidx.preference.PreferenceScreen screen(@NotNull
java.lang.String title,
@Nullable
kotlin.jvm.functions.Function1<? super androidx.preference.PreferenceScreen,kotlin.Unit> options)
Create PreferenceScreen