FloatingActionButton icon indicating copy to clipboard operation
FloatingActionButton copied to clipboard

Icon inside FloatingActionButton

Open leonardonogueira opened this issue 9 years ago • 9 comments

Is there a way to reduce icon without having to set a smaller icon to the FAB ? The icon size is standardized.

i already tried to set scaleType, padding and margin on xml, but no success yet.

my icon size is 192px x 192px (SECOND ITEM)

FAB declaration <com.github.clans.fab.FloatingActionButton android:id="@+id/fab_add_place" style="@style/FABItemStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_map_marker" app:fab_colorNormal="@color/purple" app:fab_label="@string/ADD_ALARM_places_alarm_type" />

FABItemStyle

Thanks in advance

device-2015-06-30-174723

leonardonogueira avatar Jun 30 '15 20:06 leonardonogueira

You can resize your icon programmatically and then set it as FAB's icon.

Clans avatar Jul 18 '15 12:07 Clans

How would you achieve this, I've looked at a few ways but most add a ton of code

martipello avatar Aug 04 '15 19:08 martipello

+1

FedericoPonzi avatar Jun 15 '16 21:06 FedericoPonzi

+1

Sispheor avatar Jul 06 '16 18:07 Sispheor

+1

native-mobile avatar Feb 20 '17 06:02 native-mobile

+1

mat90c avatar Aug 02 '17 21:08 mat90c

+1

saribalorhan avatar Mar 29 '18 12:03 saribalorhan

You can resize your icon programmatically and then set it as FAB's icon.

Supporting as XML attribute would be awesome!

softmarshmallow avatar Sep 25 '18 22:09 softmarshmallow

solution

abolfazlbzgh avatar Nov 06 '18 12:11 abolfazlbzgh