skip to Main Content

I want a range seekbar with two different thumb range selections.

I’m using this library but there is not an option right drawable only the left drawable is working on both ends.

<org.florescu.android.rangeseekbar.RangeSeekBar
                                    android:id="@+id/rangeSeekBar_"
                                    android:layout_width="match_parent"
                                    android:layout_height="50dp"
                                    android:visibility="visible"
                                    app:thumbPressed="@drawable/ic_seeker"
                                    app:thumbNormal="@drawable/ic_seeker"
                                    app:showLabels="false"
                               />

is there any other library or workaround please help
Complete solutions are also welcome of course 😉

2

Answers


  1. You should use material design Sliders for that.

    Add Google’s Maven Repository google() in build.gradle. For example:

     allprojects {
        repositories {
          google()
          jcenter()
        }
      }
    

    Add the library to the dependencies section:

     dependencies {
    // ...
    implementation 'com.google.android.material:material:<version>'
    // ...
     }
    

    In the layout:

    <com.google.android.material.slider.RangeSlider
      android:id="@+id/range_slider"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:contentDescription="@string/slider_desc"
      app:values="@array/initial_slider_values"
      android:valueFrom="0.0"
      android:valueTo="100.0" />
    

    For more details: https://material.io/components/sliders/android#continuous-slider

    Login or Signup to reply.
  2. Try with this range seekbar: https://github.com/YahooArchive/android-range-seek-bar

    Dependency:

    implementation
    ‘com.yahoo.mobile.client.android.util.rangeseekbar:rangeseekbar-

    library:0.1.0′

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search