Skip to content

Commit 3bc7afd

Browse files
cketchamgsajith
authored andcommitted
Disable native shadows when compat shadows are always drawn.
PiperOrigin-RevId: 219134990
1 parent 7656db9 commit 3bc7afd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/java/com/google/android/material/shape/MaterialShapeDrawable.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,11 @@ private void calculatePathForSize(RectF bounds, Path path) {
848848
@TargetApi(VERSION_CODES.LOLLIPOP)
849849
@Override
850850
public void getOutline(Outline outline) {
851+
if (shadowCompatMode == SHADOW_COMPAT_MODE_ALWAYS) {
852+
// Don't draw the native shadow if we're always rendering with compat shadow.
853+
return;
854+
}
855+
851856
boolean isRoundRect = shapeAppearanceModel.isRoundRect();
852857

853858
if (isRoundRect) {

0 commit comments

Comments
 (0)