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

[MaterialButtonToggleGroup] Support for ellipsize other than TruncateAt.END

Open
#3,420 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently MaterialButtonToggleGroups configures its children with `buttonChild.setEllipsize(TruncateAt.END);` Thus it is not possible to use other types of ellipsization, most prominently TruncateAt.Marquee. For long button texts, marquee gives the possibility to discover the full button text, which is often necessary for usability.

Ideally, the ellipsize attribute set in xml would not be overriden. I understand that with the current implementation this would not work out of the box, because marquee breaks the layout, and more work is needed to support this.

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 MaterialButtonToggleGroup implementation and the child button ellipsize configuration described in the issue. Inspect how the XML ellipsize value is currently overridden and how marquee affects the group's layout. Done means supporting non-END ellipsization, including marquee where feasible, without breaking the layout, with tests covering the 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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.