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

[Slider] Add XML attributes for custom thumbs

Open
#2,695 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

**Description:** According to the release notes, the Slider should now have a method for adding a custom thumb drawable.

**Expected behavior:** i can set a custom drawable via xml attributes (or at least via code)

**Source code:**
When i try to add a property like "app:customThumbDrawable="@drawable/ovalThumb"", I get a compile error. I guessed the name by looking at the source code...what shold the name be? In code, its also not working - I cannot find the methods...

```

```

**Android API version:** 31

**Material Library version:** 1.6.0

**Device:** Alcatel

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 Slider implementation and its existing XML attributes, using the issue's layout snippet as the reproduction case. Determine the supported public name and access path for a custom thumb drawable, then verify that the drawable can be configured from XML or code as requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
mobile
Issue type
Feature
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.