16

I use ActionBarSherlock with theme Theme.Sherlock.ForceOverflow (for using on pre Honeycomb devices) and I need turn off blue line under my ActionBar....is it possible?

SOLUTION: here

Community
  • 1
  • 1
west44
  • 747
  • 3
  • 12
  • 24

3 Answers3

14

Another way to solve the problem:

actionBar.setBackgroundDrawable(null);

Only solves the problem locally though.

user1981716
  • 141
  • 1
  • 3
  • I don't know what you mean by `only solves it locally`, but I can confirm that it does remove the blue line under the action bar – Someone Somewhere Apr 03 '14 at 22:25
  • @SomeoneSomewhere I think by `only solves it locally` he meant it only works on the activity that you do `actionBar.setBackgroundDrawable(null)`. If you were to create a new activity, you'd see the blue line again – Pawan Kumar Sep 10 '14 at 08:27
8

I'm not sure if you can remove the bar but you could change the colour of the bar to match that of the background colour?

If you want to try it try this:

<item name="android:background">@drawable/your_theme_name</item>
<item name="background">@drawable/your_theme_name</item>
James Blackburn
  • 594
  • 4
  • 23
  • west44 Please accept if this is right as I answered first (will be my first correct answer). Hope this is the answer you've been looking for :) – James Blackburn Jul 18 '12 at 08:20
  • I create styles.xml in folder res/values and I create new style which has parent="@style/Theme.Sherlock.ForceOverflow" (my old Theme) and i use your two lines (but with @android:color/transparent becouase I don't know what do you mean with @drawable/your_theme_name) and finally turn on this new style in AndroidManifest.xml. Unfortunately my ActionBar has still blue line... – west44 Jul 18 '12 at 09:26
  • by @drawable I meant a folder named "drawable" with your theme inside it. As you have called yours styles.xml you will need to use: @styles/Theme.Sherlock.ForceOverflow @styles/Theme.Sherlock.ForceOverflow – James Blackburn Jul 18 '12 at 09:33
  • I found better solution [there](http://stackoverflow.com/questions/10364045/actionbarsherlock-actionbar-custom-background-with-divider?rq=1) but thank you :) – west44 Jul 18 '12 at 09:37
  • just checked you solution pretty nice example there cheers for posting it, and thats cool man :) – James Blackburn Jul 18 '12 at 09:39
4

That blue line under the ActionBar is part of the background image (which is a 9 patch). Change the background image, or set it to a solid color, and the blue bar will go away.

SeanPONeil
  • 3,901
  • 4
  • 29
  • 42