shape with shadow

by Benjamin » Wed, 16 Dec 2009 02:20:18 GMT

Sponsored Links
 Hey guys,

how can i add shadow to a shape?

My shape.xml:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="" ;
        <gradient android:startColor="#272828" android:endColor="#272828"
                android:angle="90" />

        <padding android:left="0px" android:top="10px" android:right="0px"
                android:bottom="10px" />

        <corners android:bottomRightRadius="30px"
                android:bottomLeftRadius="30px" android:topLeftRadius="0.1dp"
                android:topRightRadius="0.1dp" />

I tried to add this shape as background to a linearlayout. After this
i added following style to the linearlayout:

<style name="shape_with_shadow">
                <item name="android:background">@drawable/shape</item>
                <item name="android:shadowColor">#ff00ff</item>
                <item name="android:shadowDx">1.2</item>
                <item name="android:shadowRadius">1.5</item>

But i don't se any shadow.  How can i fix that?

please help, thanks


Other Threads

1. Upgrade Spica to 2.1

Akhirnya setelah tanya2 ke orang pinter + puasa mutih...heheh akhirnya
selesai jg upgrade samsung galaxy spica 1.5 > 2.1

Thanx to suhu2 buat bantuan nya...

"Indonesian Android Community [id-android]" 

2. Nexus One won't debug in Ubuntu 9.10

I can't get Ubuntu 9.10 to recognize the Nexus One as a debug device.
I tried following the instructions found here but they are not

Anyone know of a link or know how to get the Nexus One to debug
correctly in Ubuntu 9.10?


3. Any androiders in Central Florid

4. Zooming into Gallery and Scrolling

5. Question on modifying the Android platform

6. Manually set preferences being overwritten by a subclass of PreferenceActivity

7. Auto Answer