title: Spinner in actionbar android
body: <p>I want to add spinner to actionbar.
  I have three items in actionbar item1,item2,spinner.</p>
  
  <pre><code>inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  firstView = inflater.inflate(R.layout.main_spinner, null);
  msg_spinner_wid = (Spinner) firstView.findViewById(R.id.msg_spinner);
  
  ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter.createFromResource(getApplicationContext(), R.array.msg_spinner_items, android.R.layout.simple_spinner_item);
  
  adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  msg_spinner_wid.setAdapter(adapter);
  msg_spinner_wid.setOnItemSelectedListener(this);
  </code></pre>
  
  <p>With above code i can see spinner in action bar but onItemSelected is not getting invoked.I have implemented AdapterView.OnItemSelectedListener as well.</p>
  
  <p>if there is any other way to implement spinner in actionbar if anybody knows kindly reply.</p>
  
  <p>Thanks
  Vishwajeet</p>