Created
December 24, 2019 11:30
-
-
Save sidishere/30b10c9ce2c9272121ff2f6f8391d320 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s1.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { | |
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { | |
if (s4.isChecked()) | |
if (s1.isChecked()) | |
smartAC.setValue(("ON")); | |
else | |
smartAC.setValue("OFF"); | |
else | |
if(s1.isChecked()){ | |
s1.setChecked(false); | |
Toast.makeText(getApplicationContext(),"Enable master switch",Toast.LENGTH_SHORT).show(); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment