I want to create range seekbar in my app. But i can't create perfectly seekbar according to image. How can i create Please tell me any one. Thanks
Asked
Active
Viewed 6,191 times
0

Gabriele Mariotti
- 320,139
- 94
- 887
- 841

ved gaur
- 46
- 1
- 6
-
use this library - https://github.com/warkiz/IndicatorSeekBar – Android Developer Aug 22 '20 at 08:11
1 Answers
6
You can use the RangeSlider
provided by the Material Components library:
<com.google.android.material.slider.RangeSlider
app:labelBehavior="withinBounds"
android:valueFrom="0"
android:valueTo="10000"
app:values="@array/initial_slider_values"
/>
with:
<resources>
<array name="initial_slider_values">
<item>2000</item>
<item>3500</item>
</array>
</resources>
You can also use the method setValues()
:
RangeSlider slider = findViewById(R.id.slider);
slider.setValues(2000f,3500f);

Gabriele Mariotti
- 320,139
- 94
- 887
- 841
-
Links to the official doc and guidelines : https://material.io/components/sliders/android – Chintan Parmar Sep 17 '21 at 06:06
-