dimanche 14 juin 2020

CheckBox in kotlin

I saw this code.

with(binding.cbFragmentSettingsUseWifiOnly) {
        isChecked = settings.useWiFiOnly
        setOnClickListener { settings.useWiFiOnly = isChecked }
        binding.clFragmentSettingsUseWifiOnly.setOnClickListener { performClick() }
    }

But, I can't understand this code.

How this code works for check box ?

code

Can any one explain ?

How this check box works?




Aucun commentaire:

Enregistrer un commentaire