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

[TextField] Label text renders outside the expected bounds

Open
#5,014 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Widget: TextField
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

**Parameters:**
- Label text letter spacing (expanded): 0.01
- Label text letter spacing (collapsed): 1
- [`CollapsingTextHelper.DEBUG_DRAW`](https://github.com/material-components/material-components-android/blob/1b44a73a41f940704eba278a74862465f0dcef90/lib/java/com/google/android/material/internal/CollapsingTextHelper.java#L75): true

**Expected behavior:** The text should be inside the magenta area.

**Actual behavior:** The text is outside the magenta area.

--


Expected result
Actual result



**Material Library version:** [`1b44a73`](https://github.com/material-components/material-components-android/tree/1b44a73a41f940704eba278a74862465f0dcef90)

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 reading CollapsingTextHelper.java at the linked DEBUG_DRAW location and reproduce the TextField case with the listed expanded and collapsed letter-spacing values. Compare the rendered label with the magenta debug area; done means the label text stays inside the expected bounds.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.