Skip to content

Commit 188cf27

Browse files
cketchamdsn5ft
authored andcommitted
Allow for setting a custom size after the FAB has been laid out already
PiperOrigin-RevId: 250520682
1 parent 6cb11c8 commit 188cf27

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/java/com/google/android/material/floatingactionbutton/FloatingActionButton.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,11 @@ public void setCustomSize(@Px int size) {
739739
throw new IllegalArgumentException("Custom size must be non-negative");
740740
}
741741

742-
customSize = size;
742+
if (size != customSize) {
743+
customSize = size;
744+
getImpl().updateSize();
745+
requestLayout();
746+
}
743747
}
744748

745749
/**

0 commit comments

Comments
 (0)