ActionBarSherlock action bar won't hide in Dialog

90 Views Asked by At

I am loading an activity that has ActionBarSherlock implemented. As the activity begins to load I show a splash screen with the following xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/splash"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:theme="@style/Theme.Sherlock.Light.NoActionBar">

    <ImageView
        android:id="@+id/logo"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:src="@drawable/splashlogo" />

</RelativeLayout>

Before loading the splash screen I call

getSupportActionBar().hide();

I have even tried:

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

But no matter what I do I always get the following on my splash screen:

enter image description here

Is there something I need to add or am doing wrong?

1

There are 1 best solutions below

0
On BEST ANSWER

In your splashscreen before the dialog.setcontentView line write

  dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);