title: Use Tab with new ToolBar (AppCompat v7-21)
body: <p>I was using SupportActionBar with tabs and a custom ActionBar theme (created with <a href="http://jgilfelt.github.io/android-actionbarstylegenerator/" rel="nofollow noreferrer">http://jgilfelt.github.io/android-actionbarstylegenerator/</a>), that show the tabs only when the user expands the search view.</p>
  
  <pre><code>public boolean onMenuItemActionExpand(MenuItem item) {
          actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
          return true;
      }
  }
  </code></pre>
  
  <p>I migrated from ActionBar to Toolbar. My app really needs to support API 9.</p>
  
  <p>Is there a way to use this code to add the tabs back?:</p>
  
  <pre><code>Toolbar toolbar = (Toolbar) findViewById(R.id.new_actionbar);
  setSupportActionBar(toolbar);
  getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
  </code></pre>
  
  <p>If possible, how can I use my custom theme or style the toolbar?</p>
  
  <p>The documentation says that this is deprecated and suggests using a different type of navigation.
  But I don't know of any other components in Android that have the same functionality.</p>
  
  <p>Some help?</p>