Floating button Android Lollipop

359 Views Asked by At

I have a style so defined:

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

      <item>
        <shape android:shape="oval"
            android:dither="true">

            <solid 
                android:color="#CCFF0000" />

        </shape>
    </item>

    <item android:bottom="2dp">
        <shape android:shape="oval"
            android:dither="true">

            <solid android:color="#F44336" />
        </shape>
    </item>

</layer-list>

I would try to draw this -> enter image description here

But i can draw the shadow. I can't use android:elevation because i would maintain compability with previous versions of android. How can i simulate the shadow as in the picture?

1

There are 1 best solutions below

0
On BEST ANSWER