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

[TabLayout] Tab layout takes up entire space while using customView

Open
#1,407 4 comments 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: Starting release version 1.1.0-alpha10 TabLayout occupies entire space when using itemView


Expected behavior:

Expected as reproduced with 1.1.0-alpha09

image

All releases after that ->

image


Source code: Sample application Testy.zip

Android API version: Android API version here

Material Library version:
Works -> 1.1.0-alpha09
Broken -> 1.1.0-alpha10 to 1.3.0-alpha01

Device: Samsung galaxy S8

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 with the Testy.zip sample application and reproduce the TabLayout sizing with a custom itemView on 1.1.0-alpha09, then compare it with 1.1.0-alpha10 through 1.3.0-alpha01. Trace the TabLayout layout behavior that differs between those versions; done means the custom-view layout no longer occupies the entire available space.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.