Skip to content

[Slider] Added an option to allow a subset of tick marks in discrete mode #1564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

gabrielemariotti
Copy link
Contributor

@gabrielemariotti gabrielemariotti commented Aug 4, 2020

With this option you can use a subset of the tick marks in respect of stepSize attribute.

screen

Example:

  <com.google.android.material.slider.Slider
    android:valueFrom="0"
    android:valueTo="1000"
    android:stepSize="50"
    app:tickValues="@array/subset_tick_values" />

with:

  <array name="subset_tick_values">
    <item>0.0</item>
    <item>100</item>
    <item>250</item>
    <item>500</item>
    <item>750</item>
    <item>1000</item>
  </array>

video

The tickValues must contain values:

  • >= valueFrom
  • <= valueTo
  • = valueFrom + a multiple of stepSize

@MaxMirren
Copy link

Please, resolve conflicts and merge to master ASAP, this functionality is highly useful
Thank you!

@drchen
Copy link
Contributor

drchen commented Feb 10, 2022

Hi I'm not sure if the author is still actively working on the github. Please feel free to help them finish the commit and I'll be glad to review it. : )

@AZKZero
Copy link

AZKZero commented Apr 18, 2024

so no update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants