material-components / material-components/material-components-android

[MaterialAlertDialogBuilder] Abnormal height in horizontal screen mode

Open
#4,728 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Widget: Dialog
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

**Description:**

Abnormal height in horizontal screen mode.

`AndroidManifest.xml`:`android:configChanges="orientation|screenSize|screenLayout"`

**Expected behavior:**

_In vertical screen mode_

Image

_In horizontal screen mode_

Image

**When using `AlertDialog`**

_In vertical screen mode_

Image

_In horizontal screen mode_

Image

**Source code:**

Image

**Minimal sample app repro:**

[TestDialog.zip](https://github.com/user-attachments/files/19604306/TestDialog.zip)

**Android API version:** 35

**Material Library version:** 1.12.0

**Device:** all devices

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the TestDialog.zip minimal sample app and reproduce the MaterialAlertDialogBuilder behavior on Android API 35 in portrait and landscape. Compare it with the standard AlertDialog and the supplied screenshots; done means the Material dialog has the expected height in horizontal mode without regressing vertical mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
design, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.