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

Last TabItem rendering error

Open
#4,016 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

### Description:
As shown in the figure, several TabLayouts were created in the demo, and the backgrounds of rounded rectangles were set for TabLayout and TabItem, but the last TabItem displayed abnormally and the rounded rectangle on the right was cut.

### Expected behavior:
rendering normal

### Source code:

layout xml file
```



```
shape_bg_ffffff_15_corner_18.xml
```

```

shape_full_tab_indicator.xml
```






```

Android API version:33

Material Library version:1.11.0

Device:Pixel 7pro

![image](https://github.com/material-components/material-components-android/assets/11420639/d8ba9195-ea89-4d10-bfe9-b90df5ed7676)

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 by reproducing the layout XML on Android API 33 with Material Library 1.11.0, using the two TabItem elements and the drawables shape_bg_ffffff_15_corner_18.xml and shape_full_tab_indicator.xml. Inspect how the TabLayout sizing and fixed tab mode affect the final item. Done means the last TabItem renders normally and the right rounded rectangle is no longer cut off.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.