Skip to content

Instantly share code, notes, and snippets.

@wispborne
Last active August 29, 2015 14:20
Show Gist options
  • Save wispborne/97ec86df79ca61e707c2 to your computer and use it in GitHub Desktop.
Save wispborne/97ec86df79ca61e707c2 to your computer and use it in GitHub Desktop.
Toolbar with shadow without Android elevation nonsense
<FrameLayout android:layout_width="match_parent"
android:layout_height="match_parent">
<include
layout="@layout/common_toolbar"/>
<FrameLayout android:layout_width="match_parent"
android:layout_height="match_parent">
<View android:layout_width="match_parent"
android:layout_height="4dp"
android:layout_below="@id/toolbar"
android:background="@drawable/toolbar_shadow"/>
// Other content, viewstub, whatever you wanna do, it goes here.
</FrameLayout>
</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#4b0f0f0f"
android:endColor="@color/transparent"
android:angle="270"/>
</shape>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment