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

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

Offen
#3,401 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug Widget: TextField
Vorherrschende Sprache
Java
Sterne
17.4k
Forks
3.2k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit dem Verhalten von TextInputEditText/TextInputLayout unter Android API 30 und reproduziere das Problem mit setCompoundDrawablesWithIntrinsicBounds nach der Eingabe von mehr als 1432 Zeichen. Als abgeschlossen gilt, dass der Text sichtbar bleibt und seine Farbe bis zum angegebenen Limit von 2000 Zeichen nicht ändert.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
android, java
Bereich
mobile
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.