I\'m creating a Android application which uses a Switch. I\'m trying to listen for changes and get the value when changed. I have two questions when usi
Android
videoLoopSwitch.setOnCheckedChangeListener(object : CompoundButton.OnCheckedChangeListener{ override fun onCheckedChanged(switch: CompoundButton?, isChecked: Boolean) { videoPlayer?.apply { setLooping(isChecked) } } })