Skip to content

Commit 990fdb4

Browse files
committed
[MaterialShapeDrawable] Update ShapeAppearanceModel.Builder to not use extra ContextThemeWrapper for shape appearance overlay due to performance concerns
PiperOrigin-RevId: 762498280 (cherry picked from commit d16a193)
1 parent e909768 commit 990fdb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ private static Builder builder(
533533
// Note: we need to wrap shape appearance and shape appearance overlay to workaround b/230755281
534534
context = new ContextThemeWrapper(context, shapeAppearanceResId);
535535
if (shapeAppearanceOverlayResId != 0) {
536-
context = new ContextThemeWrapper(context, shapeAppearanceOverlayResId);
536+
context.getTheme().applyStyle(shapeAppearanceOverlayResId, /* force= */ true);
537537
}
538538
TypedArray a = context.obtainStyledAttributes(R.styleable.ShapeAppearance);
539539

0 commit comments

Comments
 (0)