android-floating-action-button
android-floating-action-button copied to clipboard
Shadow effects appear abnormal!

As is seen in the image, I use below xml code, and get that effects.
And I add <item name="android:elevation">6dp</item> attribute in styles.xml.
<!-- Floating action button -->
<com.getbase.floatingactionbutton.FloatingActionsMenu
android:id="@+id/multiple_actions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
fab:fab_addButtonColorNormal="@color/fabRed"
fab:fab_addButtonColorPressed="@color/fabRedPressed"
fab:fab_addButtonPlusIconColor="@color/myTextPrimaryColor"
fab:fab_labelStyle="@style/menu_labels_style"
android:paddingBottom="8dp"
android:paddingRight="8dp"
android:paddingEnd="8dp">
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_favorate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fab:fab_size="mini"
fab:fab_icon="@drawable/ic_favorate"
fab:fab_plusIconColor="@color/myTextPrimaryColor"
fab:fab_title="@string/fab_favorate"
fab:fab_colorNormal="@color/fabYellow"
fab:fab_colorPressed="@color/fabYellowPressed"/>
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_download"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fab:fab_size="mini"
fab:fab_icon="@drawable/ic_download"
fab:fab_plusIconColor="@color/myTextPrimaryColor"
fab:fab_title="@string/fab_download"
fab:fab_colorNormal="@color/fabGreen"
fab:fab_colorPressed="@color/fabGreenPressed"/>
</com.getbase.floatingactionbutton.FloatingActionsMenu>
Update:
android:paddingBottom="8dp"
android:paddingRight="8dp"
android:paddingEnd="8dp">
This causes the right & buttom abnormal visual effects. But what's the reason of top & left shadow cut problem?
I know this question is aged, but I'll just reply in case anyone else facing the same issue.
To prevent this problem from happening, margin should be used instead of padding. For the explaination, you can refer to this link.