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

[TabLayout] Public API to disable certain tabs is needed

Open
#1,020 0 comments 3 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

Currently there is no obvious way to disable certain tab in TabLayout.

There are some workarounds [here at SO](https://stackoverflow.com/questions/40863257/do-not-allow-user-to-click-on-one-of-the-tabs) that work, but they seem more like hacks, there is no public API in TabLayout.

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 locating the TabLayout implementation and its current tab-selection behavior. Review the linked Stack Overflow workarounds, then determine the intended public API and how callers should disable individual tabs; the work is done when that behavior is clearly specified and covered by appropriate tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.