I am making an Android application and using android-support-v7-appcompat support to make sure my application supports action panels from Android version 2.2 and higher.
I need to do an Action Bar overlay and use a translucent background, so I changed the styles.xml to this code:
<resources>
<style name="AppBaseTheme" parent="android:Theme.Light">
</style>
<style name="AppTheme" parent="AppBaseTheme">
</style>
<style name="TranslucentAB" parent="Theme.AppCompat.Light">
<item name="windowActionBarOverlay">true</item>
<item name="android:windowActionBarOverlay">true</item>
<item name="android:actionBarStyle">@style/BlackBar</item>
<item name="actionBarStyle">@style/BlackBar</item>
</style>
<style name="BlackBar" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="android:background">@drawable/halfblack</item>
<item name="background">@drawable/halfblack</item>
</style>
</resources>
and a modified manifest file to adapt the new ActionBar as:
android:theme="@style/TranslucentAB"
The problem is that the following two lines of code require API level 11 and higher:
<item name="android:windowActionBarOverlay">true</item>
<item name="android:actionBarStyle">@style/BlackBar</item>
API 8 . , Android 2.2 . Android 4.3, . halfblack - png 70% - .