wrap
Uses the materialThemeOverlay attribute to create a themed context.
This allows us to use MaterialThemeOverlay with a default style, and gives us some protection against losing our ThemeOverlay by clients who set android:theme or app:theme. If android:theme or app:theme is specified by the client, any attributes defined there will take precedence over attributes defined in materialThemeOverlay.
Uses the materialThemeOverlay attribute and optionalAttr attributes to create a combined themed context.
The final theme overlay will apply materialThemeOverlay first, then the optionalAttr overlays in order.
This facilitates creating locally scoped, re-usable overlays for component variants. For example, if buttons can be one of two colors and one of three shapes, instead of creating a style for each color-shape combination, an overlay can be created for each color and each shape. The button can then wrap its context and pass both overlay attributes to optionalAttrs before reading color and shape values.