I'm trying to create a background drawable resource in XML that is translucent, but with a solid shadow.
This is what I have so far:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle" >
<padding
android:top="-2dp"
android:left="-2dp"
android:right="2dp"
android:bottom="2dp"
/>
<gradient
android:startColor="@android:color/transparent"
android:centerColor="#33333333"
android:endColor="#aa666666"
android:angle="90"/>
</shape>
</item>
<!-- Background -->
<item>
<shape>
<solid android:color="#99000000" />
<corners android:radius="3dp" />
</shape>
</item>
</layer-list>
I'm using a gradient shape as the background, which unfortunately obscures the translucency of the background shape. I only want to draw the gradient 2px to the right and bottom of the background shape, is that possible?