Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

transparent Actionbar with AppCompat-v7 21

Is there a way to make the ActionBar transparent in Material Design via Appcompat-v7 21? This is not working unfortunately.

  <item name="colorPrimary">@android:color/transparent</item>

Also not the old:

  <style name="Widget.Styled.ActionBar" parent="Widget.AppCompat.Light.ActionBar">
        <item name="android:background">@android:color/transparent</item>
  </style>
like image 212
ligi Avatar asked Oct 19 '14 16:10

ligi


1 Answers

<!-- Application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light">
    <item name="android:actionBarStyle">@style/MyActionBar</item>

    <!-- Support library compatibility -->
    <item name="actionBarStyle">@style/MyActionBar</item>
</style>

<!-- ACTION BAR STYLES -->
<style name="MyActionBar" parent="@style/Widget.AppCompat.ActionBar">
    <item name="android:background">@drawable/actionbar_background</item>
    <item name="android:windowActionBarOverlay">true</item>

    <!-- Support library compatibility -->
    <item name="background">@drawable/actionbar_background</item>
    <item name="windowActionBarOverlay">true</item>
</style>
like image 133
Danial Hussain Avatar answered Oct 25 '22 13:10

Danial Hussain