@@ -144,7 +144,6 @@ public class BottomAppBar extends Toolbar implements AttachedBehavior {
144144 public @interface FabAnimationMode {}
145145
146146 private final int fabOffsetEndMode ;
147- private final int fabVerticalOffset ;
148147 private final MaterialShapeDrawable materialShapeDrawable = new MaterialShapeDrawable ();
149148
150149 @ Nullable private Animator modeAnimator ;
@@ -235,7 +234,7 @@ public BottomAppBar(Context context, @Nullable AttributeSet attrs, int defStyleA
235234 float fabCradleMargin = a .getDimensionPixelOffset (R .styleable .BottomAppBar_fabCradleMargin , 0 );
236235 float fabCornerRadius =
237236 a .getDimensionPixelOffset (R .styleable .BottomAppBar_fabCradleRoundedCornerRadius , 0 );
238- fabVerticalOffset =
237+ float fabVerticalOffset =
239238 a .getDimensionPixelOffset (R .styleable .BottomAppBar_fabCradleVerticalOffset , 0 );
240239 fabAlignmentMode =
241240 a .getInt (R .styleable .BottomAppBar_fabAlignmentMode , FAB_ALIGNMENT_MODE_CENTER );
@@ -360,6 +359,7 @@ public void setCradleVerticalOffset(@Dimension float verticalOffset) {
360359 if (verticalOffset != getCradleVerticalOffset ()) {
361360 getTopEdgeTreatment ().setCradleVerticalOffset (verticalOffset );
362361 materialShapeDrawable .invalidateSelf ();
362+ setCutoutState ();
363363 }
364364 }
365365
@@ -633,7 +633,7 @@ public void onAnimationEnd(Animator animation) {
633633 }
634634
635635 private float getFabTranslationY () {
636- return -fabVerticalOffset ;
636+ return -getTopEdgeTreatment (). getCradleVerticalOffset () ;
637637 }
638638
639639 private float getFabTranslationX (@ FabAlignmentMode int fabAlignmentMode ) {
0 commit comments