wrap

open fun wrap(@NonNull context: Context, @Nullable attrs: AttributeSet, @AttrRes defStyleAttr: Int, @StyleRes defStyleRes: Int): Context

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.