Skip to content Skip to sidebar Skip to footer

How To Remove Those Dark Circular Background From Floating Action Button?

I am not able to remove those dark circle background from floating action button. By default it has a circle button with above circular shade. but some how couldnt find a way to re

Solution 1:

You can use android:outlineProvider="none".

Also, if you are using FloatingActionButton provided by the Material Components Library you can use a square fab just using the app:shapeAppearanceOverlay attribute.

Something like:

  <com.google.android.material.floatingactionbutton.FloatingActionButton 
          app:srcCompat="@android:drawable/..."
          app:shapeAppearanceOverlay="@style/SquareFabShapeOverlay"
          ../>

And in the style:

<stylename="SquareFabShapeOverlay"parent="ShapeAppearanceOverlay.MaterialComponents.FloatingActionButton"><itemname="cornerSize">0dp</item></style>

enter image description here

Post a Comment for "How To Remove Those Dark Circular Background From Floating Action Button?"