material-components / material-components/material-components-android
[Slider] Separate control over active and inactive track heighs
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
Material specification allows to control active and inactive track heights separately – https://material.io/components/sliders#specs. I'd like to see this in the `Slider` class as well.
https://github.com/material-components/material-components-android/blob/0e5c3932cb790ef40a632bea69fc9b2035552345/lib/java/com/google/android/material/slider/BaseSlider.java#L1147-L1153
https://github.com/material-components/material-components-android/blob/0e5c3932cb790ef40a632bea69fc9b2035552345/lib/java/com/google/android/material/slider/BaseSlider.java#L2051-L2056
I think the optimal solution would be to add two additional properties – `inactiveTrackHeight` and `activeTrackHeight`. They would have separate getters and setters. Current `trackHeight` could control both of them. Optionally it could be deprecated.
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 reading the Slider implementation and the referenced sections of BaseSlider.java to understand the existing trackHeight behavior. Add separate activeTrackHeight and inactiveTrackHeight getters and setters while preserving trackHeight control over both; done means the two track segments can be configured independently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100