Shape drawing - issue with corners

by Smiley » Tue, 25 Jan 2011 20:58:19 GMT


Sponsored Links
 Hi,
I am following the instruction here:
 http://developer.android.com/guide/topics/resources/drawable-resource.html 

and I am trying to draw a rectangle with only 2 rounded corners.

Here is my xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android=" http://schemas.android.com/apk/res/android" ;>

        <corners android:radius="15dp" android:bottomRightRadius="0dp"
                 android:bottomLeftRadius="0dp" />
        <gradient android:angle="90" android:startColor="#c45209"
                android:endColor="#edb18c" android:centerColor="#ea6814" />
</shape>

I tried many variations, with or without the android:radius attribute
but no luck.
Any suggestions?
Thanks,
Lior

-- 



Re: Shape drawing - issue with corners

by Kostya Vasilyev » Tue, 25 Jan 2011 21:30:45 GMT


 Lior,

Apparently, something like this works a little better:

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

-- Kostya

25.01.2011 15:58, Smiley :
Hi, I am following the instruction here: http://developer.android.com/guide/topics/resources/drawable-resource.html and I am trying to draw a rectangle with only 2 rounded corners. Here is my xml <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android=" http://schemas.android.com/apk/res/android" ;> <corners android:radius="15dp" android:bottomRightRadius="0dp" android:bottomLeftRadius="0dp" /> <gradient android:angle="90" android:startColor="#c45209" android:endColor="#edb18c" android:centerColor="#ea6814" /> </shape> I tried many variations, with or without the android:radius attribute but no luck. Any suggestions? Thanks, Lior
-- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com --


Sponsored Links


Other Threads

1. Android source code versions

Is android-1.5 and cupcake-1.5 is same?
--~--~---------~--~----~------------~-------~--~----~

2. Camera application 1.5 on emulator does nothing

you must make sure that you have already implemented libcamera in your
source code.

2009/5/22 arnouf <arnaud.far...@gmail.com>


Best Regards,
Johnny Song


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

3. Fwd: Recording Audio

4. UI not responsive

5. Extending Drawable Class

6. Refreshing a specific list-item in ListView

7. Android Podcasts at Google I/O?