1

I want to use FloatingActionButton with custom size and use bigger icon inside. how can remove padding inside icon in FloatingActionButton

Code

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_bottom_logo"
app:backgroundTint="#97D5F3"
android:padding="0dp"
app:maxImageSize="36dp"
app:fabCustomSize="64dp"
app:elevation="12dp"
app:borderWidth="0dp"
app:layout_anchor="@id/homeBottomBar"/>

edit1

app:maxImageSize => increase inside icon size

app:fabCustomSize => change fab size

edit2

design_fab_content_size no longer use in FloatingActionButton.

InsaneCat
  • 2,115
  • 5
  • 21
  • 40
saman
  • 21
  • 7

0 Answers0