File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
lib/java/com/google/android/material/shape Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,6 @@ public CornerSize apply(@NonNull CornerSize cornerSize) {
185185 private boolean shadowBitmapDrawingEnable = true ;
186186
187187 // Variables for corner morph.
188- private boolean boundsIsEmpty = true ;
189188 private boolean isRoundRectCornerMorph = true ;
190189 @ NonNull private ShapeAppearanceModel strokeShapeAppearanceModel ;
191190 @ Nullable private SpringForce cornerSpringForce ;
@@ -1111,10 +1110,9 @@ protected void onBoundsChange(Rect bounds) {
11111110 strokePathDirty = true ;
11121111 super .onBoundsChange (bounds );
11131112 if (drawableState .shapeAppearance .isStateful () && !bounds .isEmpty ()) {
1114- // We only want to skip the corner morph animation if this is the first non-empty bounds .
1115- updateShape (getState (), /* skipAnimation= */ boundsIsEmpty );
1113+ // When bounds change, we want to snap to the new shape without animation .
1114+ updateShape (getState (), /* skipAnimation= */ true );
11161115 }
1117- boundsIsEmpty = bounds .isEmpty ();
11181116 }
11191117
11201118 @ Override
You can’t perform that action at this time.
0 commit comments