0

I'm working on a camera app that simply takes pictures. I've decided to go with a FloatingActionButton anchored to a bottom app bar for the camera capture action. Everything works great, however I'm having a bit of difficulty with the FloatingActionButton itself. When I press and hold the button there is a shadow with a hexagon that appears. I don't want this animation at all. How do I remove this?

Here are images of the exact problem: The Issue

Here is the code:

 <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/capture_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:backgroundTint="@android:color/transparent"
        android:clickable="true"
        android:contentDescription="@string/shutter"
        android:focusable="true"
        android:soundEffectsEnabled="true"
        android:tint="@color/white"
        app:backgroundTint="@color/white"
        app:borderWidth="3dp"
        app:elevation="0dp"
        app:fabCustomSize="90dp"
        app:rippleColor="@null"
        android:scaleType="fitXY"
        app:layout_anchor="@id/bottom_app_bar" />
Joe
  • 263
  • 5
  • 20

1 Answers1

0

You can try to set a background or stateListAnimator="@null"

  • None of the following seemed to work: android:stateListAnimator="@null" android:background="@null" app:stateListAnimator="@null" app:background="@null" – Joe May 14 '20 at 16:51
  • Did you try to assign a value to background? For example `android:background="@android:color/white"`? – Giuseppe Criscione May 15 '20 at 07:45
  • Yes I did, but it doesn't seem to work either. I also tried @android:color/transparent – Joe May 15 '20 at 18:53