I am having problems trying to remove the Activity title text from my Action Bar Sherlock
.
I have spent(wasted) a lot of time trying to find a solution and just cannot make this work.
I have a Splash Activity
on which I go full screen. But just before the Splash Activity
appears, a screen appears (for a very short period of time) that has nothing but an Action Bar with the App Icon
and Activity Title
Text. I do not understand why it appears. Is this default Android behavior? I want to avoid this screen, or at least remove the Activity Title from the Action Bar on this screen. If I set it to "", I lose the app from the Recent Apps chooser.
Please refer to these images:
Pre Splash :
Splash Screen :
I have referred to the following examples on SO and also searched elsewhere. But nothing seems to work.
Remove the title text from the action bar in one single activity
Action Bar remove title and reclaim space
How do you remove the title text from the Android ActionBar?
How can I remove title and icon completetly in Actionbar sherlock?
Please check my Android Manifest and the theme file...
<application
android:name="com.zipcash.zipcashbetaversion.MyApplication"
android:allowBackup="true"
android:icon="@drawable/zipcash_icon"
android:label="@string/app_name"
android:logo="@drawable/zipcash_logo_small"
android:theme="@style/Theme.MyTheme" >
<activity
android:name="com.zipcash.zipcashbetaversion.SplashActivity"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.zipcash.zipcashbetaversion.SignUpActivity"
android:label="@string/title_activity_sign_up"
android:screenOrientation="portrait" >
</activity>
And so on... The following is my theme file:
<style name="Theme.MyTheme" parent="Theme.Sherlock.Light">
<!-- Set style for Action Bar (affects tab bar too) -->
<item name="actionBarStyle">@style/Widget.MyTheme.ActionBar</item>
</style>
<style name="Widget.MyTheme.ActionBar" parent="Widget.Sherlock.ActionBar">
<!-- define background for action bar (sets default for all parts of action bar - main, stacked, split) -->
<item name="android:background">@drawable/background</item>
<item name="background">@drawable/background</item>
<!-- set background for the tab bar (stacked action bar) - it overrides the background property -->
<item name="backgroundStacked">@color/action_bar_tab_background</item>
<item name="titleTextStyle">@style/NoTitleText</item>
<item name="subtitleTextStyle">@style/NoTitleText</item>
<item name="displayOptions">showHome|useLogo</item>
</style>
<style name="NoTitleText">
<item name="android:textSize">0sp</item>
<item name="android:textColor">#00000000</item>
<item name="android:visibility">invisible</item>
</style>
I have also written this code in my Splash Activity:
ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayOptions(actionBar.getDisplayOptions() ^ ActionBar.DISPLAY_SHOW_TITLE);
actionBar.hide();
ActivityHelper.initialize(this);
setContentView(R.layout.activity_splash);
Have I made a mistake that I am overlooking. Is there something else I should do. My minimum API level is 8.
Any help will be appreciated.