I want my AppCompat toolbar to be transparent with zero elevation.
Adding the android:background
attribute makes the toolbar transparent, but adding app:elevation
attribute just makes the toolbar disappear completely; the up-button and title disappear, and if the background is red or some other solid color, that color also disappears.
Any idea why?
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"
app: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>