material-components-android
material-components-android copied to clipboard
[Slider] Added an option to allow a subset of tick marks in discrete mode
With this option you can use a subset of the tick marks in respect of stepSize
attribute.

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>
The tickValues
must contain values:
-
>=
valueFrom
-
<=
valueTo
-
=
valueFrom
+ a multiple ofstepSize
Please, resolve conflicts and merge to master ASAP, this functionality is highly useful Thank you!
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. : )
so no update on this?