Reputation: 443
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 ->
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?
Upvotes: 3
Views: 350
Reputation: 1723
If you don't want to use elevation I suggest you to use a Shadow's picture as: [https://github.com/futuresimple/android-floating-action-button/blob/master/library/src/main/res/drawable-hdpi/fab_bg_mini.png][1]
Upvotes: 2