I'm using ActionBar.Tab setCustomView() method with this layout:
this is my function setting the ActionBar:
public void setActionBar() { ActionBar actionBar = getSupportActionBar(); //actionBar.hide(); actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM); actionBar.setDisplayShowHomeEnabled(false); actionBar.setDisplayShowTitleEnabled(false); //set action bar navigation mode actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); //set tabs //home tab Tab tab = actionBar.newTab().setText(TAB_HOME).setTabListener(new PicoTabListener(this, StartFragment.class)); tab.setCustomView(R.layout.tab_background); actionBar.addTab(tab); //events tab tab = actionBar.newTab().setText(TAB_EVENTS).setTabListener(new PicoTabListener(this, EventsFragment.class)); actionBar.addTab(tab); //enter event code tab = actionBar.newTab().setText(TAB_CODE).setTabListener(new PicoTabListener(this, EnterCodeFragment.class)); actionBar.addTab(tab); }
and my activity layout:
The results seams to look like this (The upper left tab with the gray background):

How can i make my custom view to fill whole tab and work properly ?
I'm using support package v7 for Android 2.3