material-components-android
material-components-android copied to clipboard
[Buttons] Max-width of buttons from component source code is not being respected
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.
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
FYI the Android studio warning directly contradicts the Material docs which have full width buttons everywhere.