title: How to use the selected item of a spinner in an if statement (Android in eclipse)
body: <p>Hi I have a spinner (spinner5) and whenever the user selects an item that says "age" I want the textview to change to 21. I have tried the following but it doesnt work. I can do this by using <code>if (getSelectedItemPosition() == 1)</code> but the spinner's contents are dynamic so thats not an option.</p>
  
  <pre><code>            if (spinner5.getSelectedItem().toString()=="age"){
              textArea.setText("21");
          }
  </code></pre>