material-components / material-components-android

Modular and customizable Material Design UI components for Android
Apache License 2.0
16.42k stars 3.08k forks source link

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

Open manabu-nakamura opened 1 week ago

manabu-nakamura commented 1 week ago

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>

See also: https://m3.material.io/components/bottom-app-bar/overview#adfd8035-0454-40e6-8ebb-1aee46d9f32a:

M2: Bottom app bar ... did not contain the FAB M3: Bottom app bar ... contains the FAB

https://github.com/material-components/material-components-android/blob/master/docs/components/BottomAppBar.md#bottom-app-bar-theming-example:

bottomappbar_theming (The bottom app bar does not contain the FAB.)