title: Getting Toolbar in Fragment
body: <p>I set up a toolbar in my main activity and when I go inside a fragment, I want to add a slider on it. If I had had the access to the Toolbar object, I would simply do:</p>
  
  <pre><code>Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
  setSupportActionBar(toolbar);
  getSupportActionBar().setDisplayShowTitleEnabled(false);
  
  
  Spinner mNavigationSpinner = new SpinnerTrigger(getSupportActionBar().getThemedContext());
  toolbar.addView(mNavigationSpinner);
  </code></pre>
  
  <p>But if I get it using </p>
  
  <pre><code>((ActionBarActivity) getActivity()).getSupportActionBar()
  </code></pre>
  
  <p>I don't have any <code>addView()</code> method. So my question is, how can I add a view to the Toolbar in fragment if the Toolbar itself was created in an Activity.</p>
  
  <p>I'm not sure if this is the best view of going about this, but I don't think I can have the Spinner in defined in the layout, because most of my fragments don't use it, they simply set a title to the toolbar. But at the same time, it would be great if I could define the toolbar once in the main activity and not redo it for every fragment.</p>