I am using a custom theme to show custom background on my actionbar. M using Actionbar Compat. I run on different devices and it gave strange result in mobiles + versions < 3.0. So after some testing i found out that even after i set a transparent color as my background m still getting something. same code works fine on my nexus 4. See the attached picture.
My Manifest:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name">
<activity
android:name="com.abtest.MainActivity"
android:label="@string/app_name"
android:theme="@style/CustomActionBarTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
My Styles:
<style name="Widget.Custom.TitleTextStyle" parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title">
<item name="android:textColor">@color/actionbar_text_color</item>
</style>
<style name="Widget.Custom.Common" parent="@style/Widget.AppCompat.ActionBar">
<item name="titleTextStyle">@style/Widget.Custom.TitleTextStyle</item>
</style>
<style name="CustomActionBarTheme" parent="@style/Theme.AppCompat.Light">
<item name="actionBarStyle">@style/MyActionBar</item>
</style>
<style name="MyActionBar" parent="@style/Widget.Custom.Common">
<item name="background">@color/actionbar_background</item>
<item name="android:windowContentOverlay">@null</item>
<item name="windowActionBarOverlay">false</item>
</style>
My Actionbar Background:
<color name="actionbar_background">#00000000</color>
Move android:windowContentOverlay
into your CustomActionBarTheme
definition. E.g.
<style name="CustomActionBarTheme" parent="@style/Theme.AppCompat.Light">
<item name="android:windowContentOverlay">@null</item>
<item name="actionBarStyle">@style/MyActionBar</item>
</style>