title: Android ICS widgets (switch) and older versions
body: <p>Is it possible to have a switch widget for ICS versions, but a checkbox for pre ICS? If so, how?</p>
  
  <p>I'm not worried about other components, only switch.</p>
  
  <p><em><strong>MY SOLUTION</em></strong></p>
  
  <p>Seeing as switch and checkbox both inherit from CompoundButton, I just did this</p>
  
  <pre><code>((CompoundButton)findViewById(R.id.swTax)).setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
  
          public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
              calculateValues();
          }
      });
  </code></pre>