Skip to content

PreferenceSection

Marc Auberer edited this page Dec 23, 2020 · 1 revision

Represents a group of preference items.

Usage example

Simple example with two item groups. Only the first one has a title.

SimpleSettings(this).show {
    Section {
        title = "Test section"
        SwitchPref {
            title = "Test 1"
            summary = "This is a Test 1"
            defaultValue = SimpleSwitchPreference.ON
        }
        TextPref {
            title = "Test 2"
            summary = "This is a Test 2"
        }
    }
    Section {
        InputPref {
            title = "Test 3"
            summary = "This is a Test 3"
        }
    }
}

You have several options to customize the appearchange of each section of your configuration. Feel free to try around a bit.