Skip to content

[MaterialAlertDialog] Custom spacing between action buttons and content #4981

@Slion

Description

@Slion

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:

Image

Reduced spacing:

Image

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.


See #4345 (comment).

I guess we would need something like:

<dimen name="m3_alert_dialog_content_min_height">48dp</dimen>

That would allow apps to override it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions