android - AppCompatActivity remove action bar shadow with style -


my app have minimum sdk 16 , i'm using appcompatactivity, need use theme.appcompat.x base theme.

i know if call getsupportactionbar().setelevation(0), can remove shadow under action bar each activity.

what want apply effect using theme. idea achieve this?

my main style , application uses @style/apptheme.

<style name="apptheme" parent="theme.appcompat.light.darkactionbar">     <!-- customize theme here. -->     <item name="colorprimary">@color/primary_dark</item> </style> 

<style name="apptheme" parent="theme.appcompat.light.darkactionbar">     <item name="colorprimary">@color/primary_dark</item>     <item name="actionbarstyle">@style/myactionbarstyle</item>     <!-- pre-lolipop -->     <item name="android:windowcontentoverlay">@null</item> </style>  <style name="myactionbarstyle" parent="@style/widget.appcompat.light.actionbar.solid.inverse">     <!-- remove shadow below action bar -->     <item name="elevation">0dp</item> </style> 

Comments