Java – Android: Hide ActionBar, keep Tabs

androidandroid-actionbarjava

To keep this simple: I have tabs in my actionbar, but the action bar take up too much space. I want that extra space. I need a way to hide the action bar, yet keep my tabs. Is there anyway to do this? Or is there a way I can get the tabs built into the action bar like it is in landscape mode? Thanks!

Best Answer

You can have an empty Actionbar, then the tabs will occupy the space:

getSupportActionBar().setDisplayShowHomeEnabled(false);              
getSupportActionBar().setDisplayShowTitleEnabled(false);