1

I tried some libraries from Github but either they don't work or I couldn't figure out how to make them work.

I just want to create a seekbar with float values, with a center of 0.

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
User104163
  • 532
  • 6
  • 17

1 Answers1

2

You can use the Slider in the Material Components Library

    <com.google.android.material.slider.Slider
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:labelBehavior="withinBounds"
        android:valueFrom="-10.0"
        android:valueTo="10.0"
        android:stepSize="1.0"/>

enter image description here

NOTE: it requires the version 1.2.0 (currently 1.2.0-rc01) of the library.

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