Reputation: 309
I have two switches A and B. Thus far I can get it so that when A is on, and I tap on it, it can go to off, and switch B to on. But if I try to initiate A to on, or B to on from off, then I can't do it. Is there a simple elegant way in which they both can talk to each other. I have already used onCheckChanged
and onClickListener
to implement a logic for this. Any help would be great.
Upvotes: 0
Views: 217
Reputation: 79
I used onCheckChanged and it worked just fine. You just use setChecked(boolean)
Upvotes: 1