material-components / material-components/material-components-android
[Chip] Support setting spannable text to a chip
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
I develop & use Emoji library which allows me to change the emoji set used for all the components. It achieves its functionality through Spans and unfortunately drawText is not capable of drawing spans as-is.
**Describe the solution you'd like**
Either draw spans manually one by one or use a Static Layout through which they can be written on the canvas.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Chip text-rendering entry point and the drawText call described in the issue. Inspect how the component currently handles text and spans, then compare the manual span and Static Layout approaches. Done means a Chip can render the requested Spannable text, including emoji spans, without losing span behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100