Skip to content

Instantly share code, notes, and snippets.

@marcauberer
Created September 1, 2020 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcauberer/b133ed00256f49ef3e45718b0214c955 to your computer and use it in GitHub Desktop.
Save marcauberer/b133ed00256f49ef3e45718b0214c955 to your computer and use it in GitHub Desktop.
SimpleSettings - Kotiln base configuration
SimpleSettings(this).show {
Section {
title = "Test section"
for (i in 0..4) {
SwitchPref {
title = "Test 1.$i"
summary = "This is a Test 1.$i"
defaultValue = if(i % 2 == 0) SimpleSwitchPreference.ON else SimpleSwitchPreference.OFF
}
}
if(true) {
TextPref {
title = "Test 2"
summary = "This is a Test 2"
}
}
}
Section {
InputPref {
title = "Test 3"
summary = "This is a Test 3"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment