material-components / material-components/material-components-android
[MaterialAlertDialog] Custom spacing between action buttons and content
Open
@hunterstich is already working on this.
Since Feb 24, 2026.
feature request
Widget: Dialog
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
For a simple dialog with a single line of text there is way too much of a gap between message and action buttons.
I could reduced the spacing a bit using:
<dimen name="m3_alert_dialog_action_top_padding" tools:override="true">0dp</dimen>
Original spacing:
Reduced spacing:
That's still much spacing but tolerable I guess.
Things could be improved further if we could override the minHeight from contentPanel in m3_alert_dialog.xml which is currently hardcoded to 48dp.
I guess we would need something like:
<dimen name="m3_alert_dialog_content_min_height">48dp</dimen>
That would allow apps to override it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.