Code example for Switch

Methods: setChecked, setOnCheckedChangeListener