Search code examples
androidandroid-toolbarshadowandroid-appbarlayoutandroid-elevation

Remove elevation shadow without removing elevation itself


Is there a way for AppBarLayout to no drop shadow and keep its elevation?

<android.support.design.widget.AppBarLayout
        app:elevation="0dp">

Solution

  • To complete M.Sandholtz answer, you can also define this in XML, with outlineProvider="none".

    <View
        android:id="@+id/viewElevationNoShadow"
        android:outlineProvider="none"
        android:elevation="4dp" />