Reputation: 8448
I'm trying to remove ActionBar
shadow that appears in this image:
Since now I've tried to add these lines in my xml
theme:
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" >
<item name="android:windowContentOverlay">@null</item>
</style>
And do it programmatically like this:
getSupportActionBar().setElevation(0);
as posted here.
But nothing is working for me...
My device is using last version of Android. Any idea on why is not working?
Upvotes: 2
Views: 1311
Reputation: 4578
Try using
<style name="AppTheme" parent="android:Theme.Holo.Light">
....
</style>
<style name="NoActionBarShadowTheme" parent="AppTheme">
<item name="windowContentOverlay">@null</item>
<item name="android:windowContentOverlay">@null</item>
</style>
And in manifest
<activity
android:theme="@style/NoActionBarShadowTheme"
And if you are using material design,try setting your toolbar elevation
to 0dp
.
Upvotes: 0
Reputation: 5363
Add this property to your Toolbar
or AppBarLayout
(I don't know if you are using AppBarLayout
):
app:elevation="0dp"
Upvotes: 3