material-components / material-components/material-components-android
[TabLayout] Indicator with tabIndicatorFullWidth=false does not match label if label is not centered
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Description:**
I have this style
```
<item name="tabIndicatorFullWidth">false</item>
<item name="tabMode">scrollable</item>
<item name="tabPaddingStart">0dp</item>
<item name="tabPaddingEnd">16dp</item>
<item name="tabGravity">start</item>
<item name="tabContentStart">0dp</item>
<item name="tabMinWidth">0dp</item>
```
and it renders as this

**Expected behavior:**
Indicator should match label width
**Android API version:**
29
**Material Library version:**
1,3.0-alpha01
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 at the TabLayout entry point and reproduce the supplied style on Android API 29 with Material Library 1.3.0-alpha01, especially tabIndicatorFullWidth=false with a non-centered label. Compare the indicator and label widths using the configuration shown; done means the indicator matches the label width.
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
- 35/100