material-components / material-components/material-components-android
[Slider] Add a way to animate a value change
Nobody has claimed this yet.
- 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 would like to animate a value change of the Slider. The Android SeekBar allows you to pass a boolean to setProgress to animate the change. See: https://developer.android.com/reference/android/widget/ProgressBar#setProgress(int,%20boolean)
Describe the solution you'd like
A new function for Slider that looks like this:
public void setValue(float value, boolean animate) { ... }
Describe alternatives you've considered
The Android SeekBar, but that does not allow me to use Material Components for the sliders.
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 at the Slider implementation and its existing setValue entry point, then compare the requested behavior with Android SeekBar's setProgress(int, boolean). Done means Slider exposes the requested overload and its value change animates when requested, with the existing Slider test area updated to verify both modes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100