material-components / material-components/material-components-android
[Slider] Add XML attributes for custom thumbs
Nobody has claimed this yet.
- 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
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 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