Install ActionBar Elevation on devices up to 5.0 using AppCompat

I want to remove a shadow from an ActionBar , and I read that you are doing this:

 getSupportActionBar().setElevation(0) 

However, this did not seem to work on Pre 5.0 devices. This is mistake? I do not use the toolbar. Just a regular ActionBar from the library.

+5
source share
1 answer

If you use an ActionBar (not a toolbar), you can remove the shadow below using this style:

 <style name="MyAppTheme" parent="Theme.AppCompat.Light"> <item name="android:windowContentOverlay">@null</item> </style> 
+6
source

Source: https://habr.com/ru/post/1205544/


All Articles