android.widget.Switch - on/off event listener?
<p>I would like to implement a switch button, android.widget.Switch (available from API v.14).</p>

<pre><code>&lt;Switch
    android:id="@+id/switch1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Switch" /&gt;
</code></pre>

<p>But im not sure how to add an event listener for the button. Should it be an "onclick" listener? And how would i know if its toggled "on" or not?</p>

<p>Thanks</p>
