I'm not sure how you would do it with the straight Drawable element like
that.  However the below bit of XML provides a Shape with rounded corners.
Perhaps it will lead you to what you need.

<shape xmlns:android="http://schemas.android.com/apk/res/android";>
    <solid android:color="#FFFFFF"/>
    <stroke android:width="1dp" android:color="#ACB2B7" />
    <padding android:left="5sp" android:top="5sp"
            android:right="5sp" android:bottom="5sp" />
    <corners android:radius="4dp" />
</shape>


On Thu, Jan 28, 2010 at 21:08, Justin Anderson <[email protected]>wrote:

> I may be wrong, but it looks to me like the rounded corners have to be
> added via code...
>
> PaintDrawable.setCornerRadius(int radius);
>
> http://developer.android.com/reference/android/graphics/drawable/PaintDrawable.html#setCornerRadius%28float%29
>
>
> ----------------------------------------------------------------------
> There are only 10 types of people in the world...
> Those who know binary and those who don't.
> ----------------------------------------------------------------------
>
>
> On Wed, Jan 27, 2010 at 3:04 AM, saikat <[email protected]
> > wrote:
>
>> Hi,
>> This page
>> http://developer.android.com/guide/topics/resources/available-resources.html#colordrawableresources
>> says that we can optionally set rounded corners for color rectangles.
>> Could anyone please tell me how to add the rounded corner
>> specification in the following code? (I have searched but didnt find
>> any example)
>>
>> <resources>
>>    <drawable name="solid_red">#f00</drawable>
>>    <drawable name="solid_blue">#0000ff</drawable>
>>    <drawable name="solid_green">#f0f0</drawable>
>> </resources>
>>
>> Thanks,
>> Saikat
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Beginners" group.
>>
>> NEW! Try asking and tagging your question on Stack Overflow at
>> http://stackoverflow.com/questions/tagged/android
>>
>> To unsubscribe from this group, send email to
>> [email protected]<android-beginners%[email protected]>
>> For more options, visit this group at
>> http://groups.google.com/group/android-beginners?hl=en
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> [email protected]<android-beginners%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to