I want to draw a custom shape in xml layout like below :
I tried to do some code in XML but i do not understand how to give shadow effect to outline of this shadow.
What i did :
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:width="20dp"
android:height="20dp"
android:gravity="top|left">
<rotate
android:fromDegrees="45"
android:pivotX="50%"
android:pivotY="50%"
android:toDegrees="45">
<shape android:shape="rectangle">
<corners android:bottomRightRadius="2dp"/>
<gradient android:type="linear" android:angle="270" android:startColor="#ffffff" android:endColor="#ffffff"/>
</shape>
</rotate>
</item>
<item
android:width="120dp"
android:height="36dp"
android:bottom="6dp">
<shape android:shape="rectangle">
<gradient
android:angle="0"
android:endColor="@color/color_white"
android:startColor="@color/color_white"
android:type="linear" />
<corners android:radius="6dp" />
</shape>
</item>
</layer-list>
What i got in result :
Can anyone suggest me how can i give shadow to outline as in the mentioned above picture? OR any other solution like 9 patch image. How can i draw such 9 patch image ?



