material-components / material-components/material-components-android
[TabLayout] Add Padding to TabItems
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
We need to be able to add extra padding between the Tab Item content and the Tab Indicator. Currently there does not seem to be an exposed way to set the padding to be used for TabItems.
**Describe the solution you'd like**
Expose a way to set a particular padding style for the text and be able to set a default for the tab padding. I notice there is a TabLayout_tabInlineLabel, but there is no documentation on how this works or if it will even do what we want to do.
**Describe alternatives you've considered**
We've considered manually including the tabItems in the tablayout layout file, and then setting margins or padding, but this doesn't work well for programmatically adding tabs.
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 and TabItem APIs, then inspect the TabLayout_tabInlineLabel attribute and the layout-file approach mentioned in the issue. Done means callers can configure padding for tab text and set a default tab padding, including for tabs added programmatically.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- design, mobile
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100