1. Floating Action Button 전체 크기 변경

fab의 사이즈를 줄이고 싶다면 app:fabsize 속성을 변경한다.

 

 

app:fabSize="mini"
    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        android:src="@drawable/ic_add_foreground"
        app:fabSize="mini"
        app:tint="@color/white" />

 

 

2. Floating Action Button 내부 아이콘 크기 변경

내부 아이콘의 크기를 변경하고 싶다면 app:maxImageSize를 설정한다.

 

 

app:maxImageSize="48dp"
    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        android:src="@drawable/ic_add_foreground"
        android:layout_margin="16dp"
        app:fabSize="mini"
        app:maxImageSize="48dp"
        app:tint="@color/white" />