Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
manabu-nakamura opened this issue Nov 17, 2024 · 0 comments · May be fixed by #4386
Labels

Comments

@manabu-nakamura
Copy link
Contributor

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.)

@manabu-nakamura manabu-nakamura linked a pull request Nov 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant