Remove ActionBar shadow on Android L (API 21)

I am trying to remove ActionBar Shadow in Android L. In API 14 this code works

<style name="AppBaseTheme" parent="Theme.AppCompat.Light"/>

<style name="AppTheme" parent="AppBaseTheme">
    <item name="android:windowContentOverlay">@null</item>                                    
</style>

      

But if I put the same code in / values ​​-v21 it doesn't work. Any idea on how I can resolve? Thank.

+3


source to share


1 answer


In Android 5.0, Action Bars uses height to provide shadow. You can remove a mark programmatically withgetSupportActionBar().setElevation(0)



+9


source







All Articles