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

[TabLayou] Add more attributes to TabLayout

Open
#1,605 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request Widget: Tab
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**
![Screenshot_2020_0811_195616](https://user-images.githubusercontent.com/22696085/89894578-e2bd5a80-dc0c-11ea-8091-05056555da06.gif)

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.