material-components / material-components/material-components-android
[Tab] Badges on edge tabs get clipped after removing a badge from another tab
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Description:** In TabLayout with `app:tabGravity="center"`, removing a badge from any tab causes badges on the first and last tabs to be partially clipped when they extend beyond the tab bounds.
Steps to reproduce
https://github.com/user-attachments/assets/80ef0ac6-14c5-4b9b-93af-ba2a9222f6d4
Result
**Material Library version:** 1.14.0-beta01
**Device:** Pixel 8 API 36
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.
Research direction
Start with the TabLayout implementation and reproduce the issue using app:tabGravity="center" on Material Library 1.14.0-beta01, then remove a badge from a tab while observing the first and last tabs. Trace the badge and tab layout handling; done means edge-tab badges remain fully visible after another tab's badge is removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100