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. starting two emulators and building apps for one or the other with new 1.5 SDK

Hi,

What I understood.

I have to create two avds

I did this with
android create -avd --name d1 --target 2 --sdcard 1024M --skin HVGA
android create -avd --name d2 --target 2 --sdcard 1024M --skin HVG

What I don't know:

How to start two emulators:
------------------------------------------
emulator '@d1' &
works fine

emulator '@d2' &
complains with
"could not bind server socket address 127.0.0.1:15555: Address already
in use"

Both emulators consume seem to start up though.
What features won't work for the second emulator.
Do I have to manually specify a port or is there some automatic
option?


How to upload an application to one platform:
--------------------------------------------------------------------


How to install to  d1 / d2:
------------------------------------

When creating a project I am only asked for the target, but not for
the device so I assume it must be a run time ant switch.

ant debug
will compile my project

ant install
or ant reinstall


complains with the error message 'more than one device and emulator'
So I guess, that there is a way to specify the target device.

ant help
does not reveal anything useful





--~--~---------~--~----~------------~-------~--~----~

2. Better way to debug when there is jar dependancies?

My application app depends on jar_a, which depends on jar_b. Now I
want to debug jar_b by changing it's code. Both the jar_a and jar_b is
built by ant tool. So my process is:

1) change jar_b
2) build jar_b
3) copy jar_b to the lib/ directory of jar_a
4) build jar_a
5) delete the reference to jar_a and jar_b in eclipse (Properties of
project) of app
6) re add the jar_a and jar_b into the eclipse

It's really painful, I don't know if I am doing the right way?

Thanks.
Bin
--~--~---------~--~----~------------~-------~--~----~

3. repo sync - no response

4. why is the sdk 1.5 prerelease releaed with obsolete documentation?

5. why is the sdk 1.5 prerelease releaed with obsolete documentation?

6. why is the sdk 1.5 prerelease releaed with obsolete documentation?

7. problem in using context.getCacheDIr() in emulator.