Search code examples
androidactionbarsherlockandroid-actionbartitle

Actionbar Sherlock title shows for a sec at first run


As i mentioned in title of question I want to completely remove title from actionbar but at first run (when I run it from eclipse) title shows for a while and it's not what I want

in the onCreate method I've add this 2 line of code and its work but LATE!!

getSupportActionBar().setTitle("");
getSupportActionBar().setDisplayShowTitleEnabled(false);

may this 2 pics help u understand me

enter image description here enter image description here


Solution

  • Set your theme to 'no action bar' in your manifest, then apply your normal theme in code after set contentview!

    android:theme="@style/Theme.Sherlock.Light.NoActionBar"
    

    and then.

        this.setTheme(R.style.myTheme); 
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);