title: How to listen for state change in SwitchCompat widget?
body: <p>How to listen for SwitchCompat widget clicks? I want to execute a few statements when the Switch is toggled.</p>
  
  <p>Looking for an equivalent of </p>
  
  <pre><code>button.setOnClickListener(new View.OnClickListener() {
      @Override
          public void onClick(View view) {
          //Do something
      }
  });
  </code></pre>