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

[AutoCompleteTextView] Dropdown selections cut off

Open
#4,026 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

In my dropdown selections, if the text is long and it needs to exceed 1 line, it just cuts the text.

![image](https://github.com/material-components/material-components-android/assets/149416745/5af05d10-ce9a-42d6-9908-9cfe8ef025ee)

Pixel 4XL.

My selection layout is:

```

```
I have tried adding various things like

`
android:singleLine="false"
android:maxLines=3
etc...
`
Nothing seems to be working.

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 reproducing the issue through AutoCompleteTextView with the provided long TextView selection layout on the reported Pixel 4XL configuration. Trace how dropdown selection views measure and render multi-line text, then verify that long selections wrap without being cut off while the supplied maxLines and singleLine settings remain respected.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
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.