Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
Updated 1 June 2018
In this blog, I have shown how to make dual thumbs Seekbar or we can say a Range SeekBar in android. But first of all, I will  give the small introduction about the simple Seekbar in android.
SeekBar is useful user interface element which is used commonly in android applications. A SeekBar is an extension of ProgressBar that allows the selection of numerical values using a natural user thumbs. Basically, SeekBar has a thumb that you can slide to choose a value between 0 and some maximum that you set.
SeekBar
You can touch the thumb and drag left or right to set the current progress or use the arrow keys.
A common usage of Seekbar is our device brightness control and volume control.
In this example, I have created a simple Seekbar
and In onCreate method
Progress Level 5
Now we have been known that how to make simple Seekbar.
But if we want to make dual thumbs means a Range Seekbar then what android doesn’t give the range Seekbar and if we want to customize Seekbar then we have to write huge lines of code.
So, I have shown you how to make the RangedSeekbar by using yahoo/android-range-seek-bar.
Actually, RangedSeekbar is a simple SeekBar similar to the default Android one, but with two thumb controls allowing a range to be selected.
Step 1: Add the dependency in app level build.gradle file
Step 2:Â Make the RangedSeekbar
In XML file,
and in your attrs.xml file
or if you want to make it programmatically then
for float
Step 3: Add the listener and get the min and max value
Some snapshots while using RangeSeekbar in android
      Â
In below block of code, IÂ have shown how to disable thumbs while dragging if the difference b/w minValue and maxValue is 40 or below 40.
Snap-Shot
For getting the complete project go to this link.
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
or please share your java class file, where you have used the RangeSeekBar.
This is link: https://github.com/oli107/material-range-bar
setOnRangeSeekBarChangeListener setNotifyWhileDragging
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Name
Email
Subject
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.