Hi all,

I have been experimenting shape drawing through AIDL. My question is if
it is possible to draw shapes inside shapes. This would be nice to
create some more advanced button forms (adding lightning effects and
that kind of stuff).

I did some experiments but was unable to create the desired effect.

I add this to res/drawables:

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android";>
     <item>
           <shape xmlns:android="http://schemas.android.com/apk/res/android";
                android:shape="rectangle">
                <stroke android:width="1dip" android:color="#FBBB" />
                <solid android:color="#6000"/>
                <layout_margin android:layout_margin="1dp"/>
                <corners
                    android:bottomRightRadius="18dip"
                    android:bottomLeftRadius="6dip"
                    android:topLeftRadius="6dip"
                    android:topRightRadius="6dip"/>

        </shape>
     </item>
        <shape xmlns:android="http://schemas.android.com/apk/res/android";
                android:shape="rectangle">
                <layout_margin android:layout_margin="1dp"/>
                <gradient
                    android:angle="270"
                    android:startColor="#6000"
                      android:endColor="#6fff" />
                <padding
                    android:left="10dp"
                    android:top="10dp"
                    android:right="10dp"
                    android:bottom="10dp" />
        </shape>
    </item>
</layer-list>

and then I set this drawable as the background of a textView. But the
shapes end up completely overlapped. The padding on the second shape
does not produce any effect.

Is it possible to make the second shape only fill a subarea of the first
shape. How to do so?

Cheers,
Filipe

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to