I've noticed a lot of material design apps with transparent toolbars with no elevation.
I've managed to make my own toolbar transparent by adding a background
attribute to the AppBarLayout
, but I can't remove the shadow by changing the elevation attribute.
Any idea how to remove elevation, or a better way to make the AppCompat toolbar transparent in general? Thanks.
Here is my AppBar
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:background="@android:color/transparent"
android:elevation="0dp"
>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
/>
</android.support.design.widget.AppBarLayout>
edit
Changing android:elevation
to app:elevation
just makes the toolbar disappear entirely