How Can we hide title bar while using action bar? How Can we hide title bar while using action bar? android android

How Can we hide title bar while using action bar?


I hide the title bar by adding the following lines of code:

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

hope this helps :)


to hide all the title bar and keep only the action bar use this code:

final ActionBar actionBar = getActionBar();actionBar.setDisplayShowHomeEnabled(false);actionBar.setDisplayShowTitleEnabled(false);actionBar.setDisplayUseLogoEnabled(false);

it worked for me


I was searching for an answer for this. Found one solution.

actionBar = getActionBar();actionBar.hide();

The above snippet will remove the tab title and slider. Hope it helps.