{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

MaterialThemeKt

public final class MaterialThemeKt


Summary

Public methods

static final void
@Composable
MaterialTheme(
    @NonNull ColorScheme colorScheme,
    @NonNull Shapes shapes,
    @NonNull Typography typography,
    @Composable @NonNull Function0<Unit> content
)

Material Theming refers to the customization of your Material Design app to better reflect your product’s brand.

Public methods

MaterialTheme

@Composable
public static final void MaterialTheme(
    @NonNull ColorScheme colorScheme,
    @NonNull Shapes shapes,
    @NonNull Typography typography,
    @Composable @NonNull Function0<Unit> content
)

Material Theming refers to the customization of your Material Design app to better reflect your product’s brand.

Material components such as Button and Checkbox use values provided here when retrieving default values.

All values may be set by providing this component with the colorScheme, typography attributes. Use this to configure the overall theme of elements within this MaterialTheme.

Any values that are not set will inherit the current value from the theme, falling back to the defaults if there is no parent MaterialTheme. This allows using a MaterialTheme at the top of your application, and then separate MaterialTheme(s) for different screens / parts of your UI, overriding only the parts of the theme definition that need to change.

Parameters
@NonNull ColorScheme colorScheme

A complete definition of the Material Color theme for this hierarchy

@NonNull Shapes shapes

A set of corner shapes to be used as this hierarchy's shape system

@NonNull Typography typography

A set of text styles to be used as this hierarchy's typography system