Stretch drawable in the layer-list

938 views Asked by At

I'm trying to add nice painted shadow to my circle float button. I made a layer-list, but the shadow image is behind the main color, and I can't make it bigger:

<?xml version="1.0" encoding="utf-8"?>
    <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:drawable="@drawable/fab_bg_normal" />

        <item android:bottom="1dp"
              android:right="1dp">
            <shape
                  android:shape="oval"
                  android:padding="10dp">
                  <size android:height="@dimen/favorites_button_large_size"
                        android:width="@dimen/favorites_button_large_size" />
                  <solid android:color="@color/pink" />
            </shape>
        </item>
    </layer-list>

I tried to make a shadow with gradient, but this looks much better

shadow -- here result if I comment/delete that pink ..

main -- here result if I uncomment/add pink solid shape

0

There are 0 answers