Created
December 4, 2017 12:59
-
-
Save wycliffepeart/30b7e69746264df8b127f9c4f1400338 to your computer and use it in GitHub Desktop.
Toolbar Elevation on Pre-lollipop Devices.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Create a new XML file toolbar.xml in directory res/layouts --> | |
<LinearLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:orientation="vertical"> | |
<android.support.v7.widget.Toolbar | |
android:layout_width="match_parent" | |
android:layout_height="?attr/actionBarSize" | |
android:background="?attr/colorPrimary" /> | |
<View | |
android:layout_width="match_parent" | |
android:layout_height="4dp" | |
android:background="@drawable/dropshadow" /> | |
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Create a new XML file dropshadow.xml in directory res/drawable --> | |
<?xml version="1.0" encoding="utf-8"?> | |
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> | |
<gradient | |
android:startColor="@android:color/transparent" | |
android:endColor="#44000000" | |
android:angle="90"/> | |
</shape> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment