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

[Chip] Bug: Chip doesn't support ellipsize="marquee" , as opposed to TextView

Open
#3,468 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request Widget: Chip
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

**Description:** Full description of issue here
Try to have `android:ellipsize="marquee"` used for Chip , as done for TextView

**Expected behavior:** Screenshots and/or description of expected behavior
To see the text moves automatically, like on TextView, because the text is too long

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

```

```

MainActivity:

```
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
findViewById(R.id.chip).isSelected = true
findViewById(R.id.textView).isSelected = true
}
}
```

**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.
[test.zip](https://github.com/material-components/material-components-android/files/11936915/test.zip)

**Android API version:** Android API version here
Android 13

**Material Library version:** Material Android Library version you are using here (e.g., 1.1.0-alpha07)
Sadly Android Studio started to make a mess...

implementation(libs.core.ktx)
implementation(libs.appcompat)
implementation(libs.material)
implementation(libs.constraintlayout)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.test.ext.junit)
androidTestImplementation(libs.espresso.core)

[versions]
agp = "8.2.0-alpha10"
kotlin = "1.8.21"
core-ktx = "1.9.0"
junit = "4.13.2"
androidx-test-ext-junit = "1.1.5"
espresso-core = "3.5.1"
appcompat = "1.6.1"
material = "1.9.0"
constraintlayout = "2.1.4"

[libraries]
core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "core-ktx" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-test-ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-test-ext-junit" }
espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso-core" }
appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }

**Device:** Device on which the bug was encountered here
Pixel 6

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 with the attached test.zip and reproduce the difference between Chip and TextView using android:ellipsize="marquee" and isSelected=true on Android 13. Trace the Chip text rendering behavior, then verify that an overflowing Chip marquee scrolls automatically like the TextView sample.

Written by the indexing model from the issue text.

Assessment

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