title: How to add subtitle to spinner in the action bar
body: <p>I have the following</p>
  
  <p><img src="https://i.stack.imgur.com/rmqUR.png" alt="Spinner"></p>
  
  <p>I am using action bar and spinner but what I want to do to add a subtitle to be like City subtitles => All , City 1 , City 2</p>
  
  <p>like this image
   <img src="https://i.stack.imgur.com/U68wG.png" alt="Spinner"></p>
  
  <p>I have the following menu xml file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;menu xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  
  &lt;item
          android:id="@+id/filter1"
          android:showAsAction="ifRoom"
          android:orderInCategory="1"
          android:actionViewClass="android.widget.Spinner"
          /&gt;
  
  &lt;item
          android:id="@+id/filter2"
          android:showAsAction="ifRoom"
          android:orderInCategory="1"
          android:actionViewClass="android.widget.Spinner" /&gt;
  
  &lt;/menu&gt;
  </code></pre>
  
  <p>and this in the Activity</p>
  
  <pre><code> public boolean onCreateOptionsMenu(Menu menu) {
          super.onCreateOptionsMenu(menu);
  
          MenuInflater inflater = getMenuInflater();
          inflater.inflate(R.menu.search_menu, menu);
          mSpinnerItem1 = menu.findItem(R.id.filter1);
          mSpinnerItem2 = menu.findItem(R.id.filter2);
  
          setupSearchView();
          View view1 = mSpinnerItem1.getActionView();
          if (view1 instanceof Spinner) {
              Spinner spinner = (Spinner) view1;
              ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter.createFromResource(this, R.array.filters, android.R.layout.simple_spinner_dropdown_item);
              spinner.setAdapter(adapter);
              spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
                  public void onItemSelected(AdapterView&lt;?&gt; arg0, View arg1,
                                             int arg2, long arg3) {
                      mDbHelper.open();
                      showResults();
                  }
  
                  public void onNothingSelected(AdapterView&lt;?&gt; arg0) {
  
                  }
              });
  
          }
  
          View view2 = mSpinnerItem2.getActionView();
          if (view2 instanceof Spinner) {
              Spinner spinner = (Spinner) view2;
              ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter.createFromResource(this, R.array.cities, android.R.layout.simple_spinner_dropdown_item);
              spinner.setAdapter(adapter);
              spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
                  public void onItemSelected(AdapterView&lt;?&gt; arg0, View arg1,
                                             int arg2, long arg3) {
  
                      mDbHelper.open();
                      showResults();
  
                  }
  
                  public void onNothingSelected(AdapterView&lt;?&gt; arg0) {
  
                  }
              });
  
          }
          return true;
      }
  </code></pre>