Skip to content Skip to sidebar Skip to footer

How To Remove Grey Shadow Color Below Floatingactionbutton

I am getting light grey color below the FloatingActionButton as shown in image. Any one know how to remove it. I tested it on Lollipop version. My xml code

Solution 1:

Try set elevation:

app:elevation="0dp"

Solution 2:

It happens when you set an elevation and the fab element has not space enough to display the "shadow".

Then you can set the elevation as 0dp as suggested above, or set a margin like

<android.support.design.widget.FloatingActionButton
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/ic_build_white_36dp"
    android:id="@+id/build"
    app:elevation="4dp"
    android:clickable="true"
    android:layout_margin="10dp"
    android:layout_alignParentBottom="true"
    android:layout_alignParentEnd="true" />

In this way the "elevation-effect" will appear correctly

Post a Comment for "How To Remove Grey Shadow Color Below Floatingactionbutton"