material-components-android icon indicating copy to clipboard operation
material-components-android copied to clipboard

[ExtendedFloatingActionButton] width is larger than necessary for short text

Open josinaldobarbosa opened this issue 1 year ago • 1 comments
trafficstars

Description: width is larger than necessary for short text, I tried a fixed width at first and it works but after using shrink() and extend() it goes back to the default width. image

Expected behavior: I resolved with android:minWidth="0dp" image

Source code:

    <com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
          android:id="@+id/fab"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          tools:text="1"
          android:textColor="@color/text_icons"
          app:iconTint="@color/text_icons"
          app:icon="@drawable/ic_refresh"
          app:backgroundTint="@color/colorPrimary"
          android:layout_marginEnd="@dimen/fab_margin"
          android:layout_marginBottom="26dp" />

Android API version: 34

Material Library version: 1.12.0 (same result on last version 1.13.0-alpha05)

Device: Pixel 7 pro (emulator)

josinaldobarbosa avatar Aug 19 '24 06:08 josinaldobarbosa