Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


use tab with new toolbar appcompat v7 21


use tab with new toolbar appcompat v7 21  using -'android,tabs,android-support-library,appcompat,android-actionbar-compat'

I was using Support ActionBar with tabs and using custom ActionBar theme (created with http://jgilfelt.github.io/android-actionbarstylegenerator/), showing the tabs only when the user expand the search view.

public boolean onMenuItemActionExpand(MenuItem item) {
        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
        return true;
    }
}


I migrated from ActionBar to ToolBar. My app really needs to support api 9.

Is there a way to use this?:

Toolbar toolbar = (Toolbar) findViewById(R.id.new_actionbar);
setSupportActionBar(toolbar);
getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);


If is possible, how to use my custom theme or style the toolbar?

Documentation say that is deprecated and suggests to use other type of navigation.
But I don't know other component in android to have the same functionality.

Some help?
    

asked Oct 19, 2015 by gauravsinghal83
0 votes
7 views



Related Hot Questions



Government Jobs Opening


...