Scott Meng
Scott Meng

Reputation: 141

modify Action Bar Sherlock theme to have no action bar

I am using ABS for my application. But I do not want my start screen (the first activity) to have action bar. How should I modify the theme to achieve this?

Many thanks in advance.

Upvotes: 1

Views: 1840

Answers (3)

Richa
Richa

Reputation: 3193

add following code in your activity :

 ActionBar ab = getActionBar();
    ab.setDisplayShowTitleEnabled(false);
    ab.setDisplayShowHomeEnabled(false);
    ab.hide();

Upvotes: 0

SKK
SKK

Reputation: 5271

You could set your activity's theme attribute in AndroidManifest.xml file to one of the following based on your requirement:

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

Upvotes: 5

Blackbelt
Blackbelt

Reputation: 157447

call hide() on your ActionBar object, inside the onCreate() of your FirstActivity

if you are using Sherlock

 getSupportActionBar().hide();

Upvotes: 2

Related Questions