I would like to have an ActionBar with the following properties:
- Overlay bar, so that the layout's parent view will stretch to full the whole window.
- A white title color for the ActionBar.
- Transparent background.
I'm targeting API 14+, with AppCompat-v7:22.2.1. So I prepare my styles like this:
<style name="Theme.MyTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
<item name="android:actionBarStyle">@style/Theme.MyTheme.MyActionBar</item>
<item name="actionBarStyle">@style/Theme.MyTheme.MyActionBar</item>
<item name="colorPrimary">#5af142</item>
<item name="colorPrimaryDark">#06dd09</item>
<item name="colorAccent">#20f304</item>
</style>
<style name="Theme.MyTheme.MyActionBar" parent="@style/Widget.AppCompat.ActionBar">
<item name="android:background">@android:color/transparent</item>
<item name="background">@android:color/transparent</item>
<item name="android:windowActionBarOverlay">true</item>
<item name="windowActionBarOverlay">true</item>
<item name="android:textColor">@android:color/white</item>
</style>
And, in the Manifest, I set Theme.MyTheme
as my activity's theme.
1 & 2 are working, 3 is not. It seams that I get a grey-ish background, and I don't know what should I change/add.