Skip to content

Instantly share code, notes, and snippets.

@mrahimygk
Last active July 11, 2017 06:12
Show Gist options
  • Save mrahimygk/53a2684304fb67a4890b994d12fbfb0c to your computer and use it in GitHub Desktop.
Save mrahimygk/53a2684304fb67a4890b994d12fbfb0c to your computer and use it in GitHub Desktop.
An xml file for android. It is best used with tall (portrait) elements like navigation drawer backgrounds and overlay on portrait images with RelativeLayouts. I kept it single-filed, you can use @Dimen or @color. See the result in https://pasteboard.co/GAotgJ8.png
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:bottom="4dp"
android:left="4dp"
android:right="4dp"
android:top="4dp">
<shape android:shape="rectangle" >
<corners android:radius="11dp" />
<gradient
android:angle="270"
android:endColor="#55006064"
android:startColor="#5500ACC1"
android:type="linear" />
</shape>
</item>
<item
android:bottom="-200dp"
android:left="-220dp"
android:right="50dp"
android:top="-200dp">
<shape android:shape="oval" >
<gradient
android:endColor="#2200ACC1" />
</shape>
</item>
</layer-list>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment