associate an event to the spinner
<p>I've created a spinner for my application. This is the code in the main.xml</p>

<pre><code> &lt;Spinner
    android:id="@+id/sMenu"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:prompt="@string/base"
    /&gt;
</code></pre>

<p>and in my main class</p>

<pre><code>    String [] base = {"Decimale", "Binaria", "Ottale", "Esadecimale"};
    Spinner s1;
    s1 = (Spinner) findViewById (R.id.sMenu);

    ArrayAdapter adapter = ArrayAdapter.createFromResource(this, R.array.base, android.R.layout.simple_spinner_item);
    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    s1.setAdapter(adapter);
</code></pre>

<p>The program converts a number in binary, decimal, octal, hexadecimal. I want to associated some events to the spinner. For example, if I select in the spinner binary, in the edit text I can put only binary numbers. In which way I can associate this event to the spinner?</p>
