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=" http://schemas.android.com/apk/res/android" ;
        android:shape="rectangle">
        <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" />
</shape>


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>
        </style>


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

please help, thanks

--



Other Threads

1. How to detect the app is cracked?

Not that I care but I am just curious - I would also like to place a
ads banner to the app if it detects the app the user running is a
cracked app.

I know in iPhone I can do it by checking the info.plist etc.

Any idea?

-- 

2. how to dynamic create a imageview on widget?

hi all,

   i want to  dynamic create imageview on a widget.  how can i do
this?

thanks a lot

grays

-- 

3. Set wallpaper as background

4. Gagal download

5. read birth date from contact list in Android-1.6

6. Android Phone Vs iPhone 3GS

7. Asph*lt 3.0.