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

[TextInputLayout] startIconDrawable overlaps text

Open
#3,993 1 comment 5 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

**Description:** startIconDrawable in TextInputLayout in RecyclerView.ViewHolder overlaps text if item does not fit on the screen without scroll (ViewHolder is created later, not when screen is just opened). Text is displayed correctly after scroll to top or after minimizing the app.

**Expected behavior:** startIconDrawable does not overlap text

**Source code:**
```

```

**Minimal sample app repro:** https://github.com/IreneKhramova/start-icon-issue

**Android API version:** API 29

**Material Library version:** 1.11.0+

**Device:** Honor 20 pro

https://github.com/material-components/material-components-android/assets/22375303/85085fd0-2016-4c01-9cce-2bfaf1d75a18

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 running the linked minimal sample app and inspecting the provided TextInputLayout XML in its RecyclerView.ViewHolder context on API 29 with Material 1.11.0 or later. Compare the initial layout with the state after scrolling or minimizing the app, then trace the relevant TextInputLayout start-icon behavior. Done means startIconDrawable no longer overlaps the text when the item is first created.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.