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

[NavigationView] strange rectangle appears when window overlaps with display cutout in edge-to-edge mode

Open
#4,571 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

**Description:** The strange rectangle appears when the window overlaps with the display cutout in edge-to-edge mode.
Test11
![Image](https://github.com/user-attachments/assets/ab7b2299-f2a7-4b48-94fa-7a2cc918083e)
(#3983 or #4576) Catalog app
![Image](https://github.com/user-attachments/assets/783f8036-c3bf-4d01-b56b-f82e82994747)

**Expected behavior:** The strange rectangle doesn't appear when the window overlaps with the display cutout in edge-to-edge mode.
Test11
![Image](https://github.com/user-attachments/assets/724fee28-738d-4aa8-a382-3677692e04e7)
(#3983 or #4576) Catalog app
![Image](https://github.com/user-attachments/assets/b12cca5b-498e-4d4f-9095-9bae730f6926)

**Source code:**
```xml






```
```xml


<item name="android:windowLayoutInDisplayCutoutMode">always</item>

```

**Minimal sample app repro:** [Test11.zip](https://github.com/user-attachments/files/18632896/Test11.zip)

**Android API version:** 35

**Material Library version:** 1.13.0-alpha10

**Device:** Emulator 35.3.11

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 Test11.zip minimal sample and reproduce the rectangle on the API 35 emulator using Material Library 1.13.0-alpha10. Inspect the DrawerLayout, CoordinatorLayout, AppBarLayout, MaterialToolbar, and NavigationView configuration together with the edge-to-edge and display-cutout settings. Done means the rectangle no longer appears when the window overlaps the display cutout.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.