How to Remove Shadow Below ActionBar or Toolbar

How to Remove Shadow Below ActionBar or Toolbar

Hello Again,

Remove Shadow ActionBar in Android. I tried to remove Shadow Below with the Theme.AppCompat.Light.NoActionBar, using every recommendation of people, but no luck. In this post, we have managed to share a brief guide on removing the shadow in that appear below in Antion bar or Toolbar in Android.

How to Remove Shadow ActionBar or Toolbar

Like it seems in the below picture.

Popular Posts

Finally.. I’m sharing the solution

So the solution is :

If your Toolbar is inside android.support.design.widget.AppBarLayout Adding app:elevation=”0dp” on android.support.design.widget.AppBarLayoutwill solve your problem.

Else add app:elevation="0dp" on Toolbar.

<android.support.design.widget.AppBarLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:fitsSystemWindows="true"
app:elevation="0dp">

<android.support.v7.widget.Toolbar
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

So the issue got solved now 🙂

Happy Coding & Hope it helps 🙂

Related threads

Leave a comment