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

[TextInputLayout] the text disappears after reaching the limit of 1432 characters, while having drawable set to setCompoundDrawablesWithIntrinsicBounds

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

Description: we have a custom view inherited from TextInputEditText, in which we specify the image on the right side using the setCompoundDrawablesWithIntrinsicBounds function, this view has a line length limit of 2000 characters,
but when you enter more than 1432 characters, the text changes color.
attached video below
Expected behavior: text will not change color and disappear

Source code: The code snippet which is causing this issue:
image
image

Minimal sample app repro: Please consider attaching a minimal sample app that reproduces the issue. This will help narrow down the conditions required for reproducing the issue, and it will speed up the bug fix process. You may attach a zip file of the sample app or link to a GitHub repo that contains the sample app.

Android API version: Android API version here:

  • api 30
    Material Library version: Material Android Library version you are using here (e.g., 1.1.0-alpha07) :
  • com.google.android.material:material:1.8.0 (I changed the version to the latest, did not help)
    Device: Device on which the bug was encountered here :
  • Pixel2

To help us triage faster, please check to make sure you are using the latest version of the library.

We also happily accept pull requests.

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 from TextInputEditText/TextInputLayout behavior on Android API 30 and reproduce the issue with setCompoundDrawablesWithIntrinsicBounds after entering more than 1432 characters. Done means the text remains visible and does not change color up to the stated 2000-character limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.