Skip to content

Commit a3a7d86

Browse files
pubiqqpekingme
authored andcommitted
[FloatingActionButton] Fix the width calculation in the wrap_content extend strategy
Resolves #4695 Resolves #4630 - 1561cbd by pubiqq <[email protected]> PiperOrigin-RevId: 759607074
1 parent d9108c3 commit a3a7d86

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,8 @@ private Size getSizeFromExtendStrategyType(@ExtendStrategy int extendStrategyTyp
293293
@Override
294294
public int getWidth() {
295295
return getMeasuredWidth()
296-
- getCollapsedPadding() * 2
296+
- ExtendedFloatingActionButton.this.getPaddingStart()
297+
- ExtendedFloatingActionButton.this.getPaddingEnd()
297298
+ extendedPaddingStart
298299
+ extendedPaddingEnd;
299300
}

0 commit comments

Comments
 (0)