Skip to content

Instantly share code, notes, and snippets.

@sidishere
Created December 24, 2019 11:32
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 sidishere/28831cd74149a2550aacec93cc6570ae to your computer and use it in GitHub Desktop.
Save sidishere/28831cd74149a2550aacec93cc6570ae to your computer and use it in GitHub Desktop.
s4.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener()
{
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
{
if (!s4.isChecked())
{
s1.setChecked(false);
s2.setChecked(false);
s3.setChecked(false);
smartAC.setValue("OFF");
smartBulb.setValue("OFF");
smartFan.setValue("OFF");
masterSwitch.setText("Master Switch OFF");
}
else{ masterSwitch.setText("Master Switch ON");
} } });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment