How Can we hide title bar while using action bar?
Posted
by
Arci
on Stack Overflow
See other posts from Stack Overflow
or by Arci
Published on 2012-11-23T03:36:50Z
Indexed on
2012/11/23
4:59 UTC
Read the original article
Hit count: 151
I'm using ActionBarSherlock and I'm trying to hide the title bar of my application but whenever I do that, I get a NullPointerException
when accessing the ActionBar
How do I remove/hide the title bar? Please note that I'm not referring to the title of the action bar. I'm referring to the title bar above the action bar. I'm running my application on an Android 2.3 device.
Below is my code: (My class extends SherlockFragmentActivity
.)
super.onCreate(savedInstanceState);
setTheme(R.style.Theme_Sherlock);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
ActionBar actionbar = getSupportActionBar();
actionbar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); //I get the NullPointerException here.
//...
setContentView(R.layout.tab_navigation);
© Stack Overflow or respective owner