tags:

views:

16

answers:

0

Hi
I'm trying to set a shape defined in XML as view's background. Here's it:

<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
    android:startColor="#fcfcfc"
    android:endColor="#cfcfcf"
    android:angle="270" />
<padding
    android:left="10dp"
    android:top="10dp"
    android:right="10dp"
    android:bottom="10dp" />
<stroke
    android:width="3dp"
    android:color="#aaaaaa">
</stroke>
<corners
    android:radius="1dp" />
</shape>

Although I've defined padding in the shape when I set it as a background to layout shape's edge completely match view's edge. Is it possible to make shape not to fill entire view?

Thanks