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

[Buttons] Max-width of buttons from component source code is not being respected #4102

Open
nicbell opened this issue Mar 14, 2024 · 1 comment
Assignees

Comments

@nicbell
Copy link

nicbell commented Mar 14, 2024

Description:

According to the source code Material buttons should be 320dp maximum by default but this not actually working.

This causes warnings in Android Studio.

image

https://github.com/material-components/material-components-android/blob/release-1.11/lib/java/com/google/android/material/button/res/values/dimens.xml#L20

https://github.com/material-components/material-components-android/blob/release-1.11/lib/java/com/google/android/material/button/res/values/styles.xml#L39

The warning can be suppressed with tools:ignore="VisualLintButtonSize" but it would be better to fix the component to behave as specified in the source.

Material Library version:
1.11

@nicbell nicbell changed the title Max-width of buttons from component source code is not being respected [Buttons] Max-width of buttons from component source code is not being respected Mar 14, 2024
@nicbell
Copy link
Author

nicbell commented Mar 19, 2024

FYI the Android studio warning directly contradicts the Material docs which have full width buttons everywhere.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants