We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1756f23 commit 7674e12Copy full SHA for 7674e12
lib/java/com/google/android/material/internal/CollapsingTextHelper.java
@@ -672,6 +672,14 @@ private void calculateOffsets(final float fraction) {
672
int textAlpha = (int) (calculateFadeModeTextAlpha(fraction) * originalAlpha);
673
674
textPaint.setAlpha(textAlpha);
675
+ // Workaround for API 31(+). Applying the shadow color for the painted text.
676
+ if (VERSION.SDK_INT >= VERSION_CODES.S) {
677
+ textPaint.setShadowLayer(
678
+ currentShadowRadius,
679
+ currentShadowDx,
680
+ currentShadowDy,
681
+ MaterialColors.compositeARGBWithAlpha(currentShadowColor, textPaint.getAlpha()));
682
+ }
683
}
684
685
ViewCompat.postInvalidateOnAnimation(view);
0 commit comments