5

I changed the AndroidManifest from

android:targetSdkVersion="18"

to

android:targetSdkVersion="19"

Now i have a issue with my transparent actionbar using a png

this i the actionbar layout i want to, on a N4 with v18:

v18 nice actionbar

and this is the actionbar on v19 on the n5, there is a "little" transparency, but not full:

v19, bad actionbar

This is my theme setup in values/styles.xml:

<style name="MyTheme" parent="Theme.Sherlock.Light">
    <item name="windowActionBarOverlay">true</item>

    <!-- Actionbar Background -->
    <item name="actionBarStyle">@style/My.Actionbar</item>
</style>
<style name="My.Actionbar" parent="Widget.Sherlock.Light.ActionBar.Solid">
    <item name="background">@drawable/actionbarbg</item>
    <item name="android:background">@drawable/actionbarbg</item>
</style>

and this in the values-v19/styles.xml

 <style name="MyTheme" parent="Theme.Sherlock.Light">
      <item name="actionBarStyle">@style/My.Actionbar</item>
      <item name="android:actionBarStyle">@style/My.Actionbar</item>
      <item name="windowActionBarOverlay">true</item>
      <item name="android:windowActionBarOverlay">true</item>
</style>

<style name="My.Actionbar" parent="Widget.Sherlock.Light.ActionBar.Solid">
    <item name="android:background">@drawable/actionbarbg</item>
</style>

If i change back the targetSdk to 18, it also works on the Nexus5

Any Idea whats my mistake?

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
develth
  • 771
  • 8
  • 32
  • 2
    I am not sure where we are suppose to be looking, I really dont see a difference. Could you maybe point out your concern? – tyczj Nov 08 '13 at 17:23
  • i made a blue border around a area. its just a small difference between the grey bar and the magenta background, the trans magenta is a little bit lighter then the background of the activity. – develth Nov 08 '13 at 17:31

1 Answers1

8

The issue you are seeing is that there is a drop shadow that normally sits below the action bar. You can remove it by adding

<item name="android:windowContentOverlay">@null</item>

to the styles for your apptheme in the values-v19 folder.

Source: this answer

Community
  • 1
  • 1
anthonycr
  • 4,146
  • 1
  • 28
  • 35