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

[Navigation Rail] Unwanted Left Padding

Open
#4,355 0 comments 0 reactions 1 assignee View on GitHub

@imhappi is already working on this.

Since Oct 24, 2024.

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

Description

**Description:**
In my app ui, when in landscape mode, I use NavigationRail. It works finely for my purpose but it has an issue of unwanted left/start padding.

**Expected behavior:**
No useless left padding should've been there

**Source code:**
```


```

```
navigationView.apply {
setOnApplyWindowInsetsListener(null)
setPadding(0, 0, 0, 0)
}
```

**Android API version:** Android API 34

**Material Library version:** Material Android Library version 1.12.0

**Device:** Realme GT Neo 3T

**Sample Image**
![image](https://github.com/user-attachments/assets/ed27b139-2e47-49ba-9191-b764f16699f0)

Note: This issue doesn't occur when app is run on an Android TV

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.