I have implemented tab host with navigation drawer using ActionBarShaerlock. Currently element to open navigation drawer on action bar and tab host in bottom of it.
I want tabs in actionbar. It it possible to do so?
I have implemented tab host with navigation drawer using ActionBarShaerlock. Currently element to open navigation drawer on action bar and tab host in bottom of it.
I want tabs in actionbar. It it possible to do so?
you can add tabs below action bar using something like this-
ActionBar actionBar = getSupportActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
actionBar.setDisplayShowTitleEnabled(false);
Tab tab = actionBar.newTab()
.setText(R.string.artist)
.setTabListener(new TabListener<ArtistFragment>(
this, "artist", ArtistFragment.class));
actionBar.addTab(tab);
tab = actionBar.newTab()
.setText(R.string.album)
.setTabListener(new TabListener<AlbumFragment>(
this, "album", AlbumFragment.class));
actionBar.addTab(tab);
see this link here
hope this will help you.