title: Android Spinner validation
body: <p>I need to validate <em>selected item</em> of <code>Spinner</code> in <code>Android</code>.</p>
  
  <p>I tried the following code, but it's not working.</p>
  
  <pre><code>if (Spinner1.getSelectedItem().toString().trim() == "Pick one") {
      Toast.makeText(CallWs.this, "Error", Toast.LENGTH_SHORT).show();
  }
  </code></pre>
  
  <p>What is wrong with the code, and how can i fix it?</p>