Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you remove the title text from the Android ActionBar?

I'm looking through the Holo.Light theme, and I can't seem to find the magic style to override to get rid of the title text that briefly shows up when my app first launches.

How can I do that?

like image 795
Christopher Perry Avatar asked Oct 05 '11 01:10

Christopher Perry


People also ask

How do I remove the title bar Kotlin?

Another way for removing the title specifically from an activity is by using a getSupportActionBar(). hide() method. Inside the activity's kotlin file, we need to invoke getSupportActionBar(). hide() method.

How will you hide the title of an activity?

The requestWindowFeature(Window. FEATURE_NO_TITLE) method of Activity must be called to hide the title.


2 Answers

Try:

 getActionBar().setDisplayShowTitleEnabled(false); 

For v.7:

 getSupportActionBar().setDisplayShowTitleEnabled(false); 
like image 140
Filippo Mazza Avatar answered Sep 28 '22 03:09

Filippo Mazza


I think this is the right answer:

<style name="AppTheme" parent="Theme.Sherlock.Light.DarkActionBar">     <item name="actionBarStyle">@style/Widget.Styled.ActionBar</item>     <item name="android:actionBarStyle">@style/Widget.Styled.ActionBar</item> </style>  <style name="Widget.Styled.ActionBar" parent="Widget.Sherlock.Light.ActionBar.Solid.Inverse">     <item name="android:displayOptions">showHome|useLogo</item>     <item name="displayOptions">showHome|useLogo</item> </style> 
like image 24
cesards Avatar answered Sep 28 '22 04:09

cesards