Skip to content

Instantly share code, notes, and snippets.

@kheldiente
Created May 29, 2018 03:19
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 kheldiente/be72f6b9a7c74210a2cd66ec67ca89f9 to your computer and use it in GitHub Desktop.
Save kheldiente/be72f6b9a7c74210a2cd66ec67ca89f9 to your computer and use it in GitHub Desktop.
On switch toggled
override fun onCheckedChanged(compoundButton: CompoundButton?, checked: Boolean) {
enableEqualizer(checked)
presetAdapter?.enableAll(checked) // Update color state of list
}
private fun enableEqualizer(enable: Boolean) {
equalizer?.enabled = enable
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment