Question

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

Was it helpful?

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.

OTHER TIPS

try one of these possibly?

add this to the manifest file under application:

android:theme="@android:style/Theme.NoTitleBar"

or in your activity:

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

getActionBar().setDisplayOptions(Window.FEATURE_NO_TITLE);

It worked for me hope it will help you out. And this will give result like this

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top