diff --git a/lib/java/com/google/android/material/internal/CollapsingTextHelper.java b/lib/java/com/google/android/material/internal/CollapsingTextHelper.java index 2e47766b014..6860c8b316f 100644 --- a/lib/java/com/google/android/material/internal/CollapsingTextHelper.java +++ b/lib/java/com/google/android/material/internal/CollapsingTextHelper.java @@ -696,17 +696,6 @@ private void calculateOffsets(final float fraction) { currentDrawY = lerp(expandedDrawY, collapsedDrawY, fraction, positionInterpolator); setInterpolatedTextSize(fraction); - - if (collapsedLetterSpacing != expandedLetterSpacing) { - textPaint.setLetterSpacing( - lerp( - expandedLetterSpacing, - collapsedLetterSpacing, - fraction, - AnimationUtils.FAST_OUT_SLOW_IN_INTERPOLATOR)); - } else { - textPaint.setLetterSpacing(collapsedLetterSpacing); - } } setCollapsedTextBlend( @@ -1099,7 +1088,11 @@ private void calculateUsingTextSize(final float fraction, boolean forceRecalcula newTypeface = collapsedTypeface; } else { newTextSize = expandedTextSize; - newLetterSpacing = expandedLetterSpacing; + newLetterSpacing = lerp( + expandedLetterSpacing, + collapsedLetterSpacing, + fraction, + AnimationUtils.FAST_OUT_SLOW_IN_INTERPOLATOR); newTypeface = expandedTypeface; if (isClose(fraction, /* targetValue= */ 0)) { // If we're close to the expanded text size, snap to it and use a scale of 1