I want to show only tabs in my action bar, so i hide title and home icon programatically
viewPager = (ViewPager) findViewById(R.id.pager);
actionBar = getActionBar();
mAdapter = new TabsPagerAdapter(getSupportFragmentManager());
viewPager.setAdapter(mAdapter);
actionBar.setDisplayShowTitleEnabled(false);
actionBar.setDisplayShowHomeEnabled(false);
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
Everything works fine in portrait mode. Tabs occupy full space of width.
But if I switch to the landscape mode, tabs occupy approximatelly 40% of width.
I want to expand tabs in landscape mode exactly like in portrait mode. I tried a lot of things, but I didn't find any solution. It is possible or only one way is to use TabHost?
Edit: My pager layout:
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />