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

[Slider] Double tap to reset to default value

Open
#1,715 0 comments 1 reaction 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

Sliders are often used in Photo/Video editing software. Having a quick way to reset it to default value is a pretty common pattern in most of the apps nowadays.

I suggest adding a double tap on a Thumb feature, allowing the user to have a listener on this action.

It should be fairly easy to do in the library, but pretty problematic to workaround in user code, since Slider doesn't work with onClickListener at all now.

As an alternative, Slider can accept clicks on a Thumb and support a regular click listener?

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 at the Slider and Thumb touch-handling entry points described in the issue, and inspect the existing interaction behavior. Clarify whether completion means double-tap reset with a listener or regular click support; the chosen interaction should be exposed and covered by tests.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.