Search code examples
androidactionbarsherlocktitlebar

android: title bar hide


I have this activity made with actionBarSherlock. Is it possible to hide title of activity (not only text but the title bar) I tried:

getSupportActionBar().hide();

but it hides tabs too.

Picture: https://fbcdn-sphotos-b-a.akamaihd.net/hphotos-ak-prn1/q71/1017267_10200157522600680_915484448_n.jpg


Solution

  • 1.You must call setNavigationMode(NAVIGATION_MODE_TABS) to make the tabs visible

    getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
    

    2.You must disable the activity title by calling setDisplayShowTitleEnabled(false)

    getSupportActionBar().setDisplayShowTitleEnabled(false);
    

    3.You must disable application home affordance by calling setDisplayShowHomeEnabled(false)

    getSupportActionBar().setDisplayShowHomeEnabled(false);
    

    This way should able to able to get a look like this in your activity.