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

[Chip] Support setting spannable text to a chip

Open
#705 0 comments 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

**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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.