Skip to content

[Docs] shapeAppearanceSmallComponent, shapeAppearanceMediumComponent, and shapeAppearanceLargeComponent have no effect #4385

@manabu-nakamura

Description

@manabu-nakamura

Description:
shapeAppearanceSmallComponent, shapeAppearanceMediumComponent, and shapeAppearanceLargeComponent have no effect because they are not used in Widget.Material3.* (they are used in Widget.MaterialComponents.*):

https://github.com/material-components/material-components-android/blob/master/docs/components/BottomAppBar.md
https://github.com/material-components/material-components-android/blob/master/docs/components/Button.md
https://github.com/material-components/material-components-android/blob/master/docs/components/Card.md
https://github.com/material-components/material-components-android/blob/master/docs/components/Chip.md
https://github.com/material-components/material-components-android/blob/master/docs/components/DatePicker.md
https://github.com/material-components/material-components-android/blob/master/docs/components/SideSheet.md
https://github.com/material-components/material-components-android/blob/master/docs/components/TextField.md

e.g., https://github.com/material-components/material-components-android/blob/master/docs/components/DatePicker.md:

<style name="Theme.App" parent="Theme.Material3.*">
    ...
    <item name="colorPrimary">@color/shrine_pink_100</item>
    <item name="colorOnPrimary">@color/shrine_pink_900</item>
    <item name="shapeAppearanceSmallComponent">@style/ShapeAppearance.App.SmallComponent</item>
    <item name="shapeAppearanceMediumComponent">@style/ShapeAppearance.App.MediumComponent</item>
</style>

<style name="ShapeAppearance.App.SmallComponent" parent="ShapeAppearance.Material3.SmallComponent">
    <item name="cornerFamily">cut</item>
</style>

<style name="ShapeAppearance.App.MediumComponent" parent="ShapeAppearance.Material3.MediumComponent">
    <item name="cornerSize">16dp</item>
</style>

Expected behavior:

<style name="Theme.App" parent="Theme.Material3.*">
    ...
    <item name="colorPrimary">@color/shrine_pink_100</item>
    <item name="colorOnPrimary">@color/shrine_pink_900</item>
    <item name="shapeCornerFamily">cut</item>
</style>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions