Code example for ActionBar

Methods: setNavigationMode

    protected void setUp() { 
        if (mActionBar == null) {
            mActionBar = mActivity.getActionBar();
    public void addTab(CompatTab tab) {
        String tag = tab.getTag();
        // Check to see if we already have a fragment for this tab, probably 
        // from a previously saved state.  If so, deactivate it, because our 
        // initial state is that a tab isn't shown. 
        Fragment fragment = mActivity.getSupportFragmentManager().findFragmentByTag(tag);
Connect your IDE to all the code out there  Get Codota for Java