سؤال

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

هل كانت مفيدة؟

المحلول

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.

نصائح أخرى

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top