Possible Duplicate:
how to set shadow to a View in android?
In my Android app I need a layout with round corners and the background should have some transparency. For this I'm using this xml, it works fine:
customshape.xml:
<shape android:shape="rectangle">
<gradient android:startColor="#E2FFFFFF" android:endColor="#E2D0E3E5" android:angle="270"/>
<corners android:radius="10dp" />
</shape>
style.xml:
<style name="LinearLayoutRoundCorners">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:background">@drawable/customshape</item>
</style>
I also need a small shadow to the right and bottom of the layout. I can not find a way to do this. I've seen a hack where you put another layout behind to make it look like a shadow but that will not work for me as my layout have transparency, so that will not look very good. How can I get a nice looking shadow on my layout without using an image as background of the layout?