material-components / material-components/material-components-android
[TabLayou] Add more attributes to TabLayout
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Feature request related to a problem**
- I want to set the indicator to rounded corners, but I can’t.
- I want to set the indicator width, but I can’t.
- I want to set the indicator to slide sticky, but I can’t.
- I want to set the color of the tab's text when sliding, but I can’t
- ...
**Describe the solution**
- Tablayou should have the following attributes
- tabIndicatorRoundCornerStyle `set the indicator to rounded corners`
- tabIndicatorScale `set how many times the width of indicator is tab`
- tabIndicatorStickyOffset `set indicator can be sticky offset when ViewPager offset`
- tabIndicatorStickyOffsetScale `set the maximum width of indicator when it is offset`
- tabTextColorStickyOffset `set the color of the text to change between selected and unselected, the color value is calculated with this offset`
- tabTextSizeStickyOffset `Same as above`
- ...
**Describe alternatives**
There is no way except to rewrite TabLayout
**Effect picture**

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 by reviewing the TabLayout entry point and the requested indicator and text attributes. Compare the behavior shown in the linked GIF with the listed requirements, then establish acceptance cases for rounded corners, indicator sizing, sticky offsets, and changing text styling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- design, mobile
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100