I'd like to create a drawable and use it as a backround for my buttons. The shadow's height must be 18dip. See the picture.
I've tried it this way, but it's not working:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false">
<layer-list>
<item android:gravity="bottom">
<bitmap android:src="@drawable/shadow9path"/> // This is a 9-path picture
</item>
<item android:gravity="bottom"
android:bottom="18dp">
<shape android:shape="rectangle">
<size android:height="@dimen/..." />
<corners android:radius="@dimen/..." />
<solid android:color="@color/..." />
</shape>
</item>
</layer-list>
</item>
...
</selector>
EDIT: The shadow should be only on the bottom of the button. So the button should not be rounded with the shadow. I need something like a compound view, which consists of the button and the shadow below it.