I need to the price range seekbar or slider like I have mentioned in the below image. Any help or sample code will be much appreciated.
Thanks in advance.
Step1: Create a new project. After that, you will have java and XML file. Step2: Open your xml file and add a SeekBar and TextView for message as shown below, max attribute in SeekBar define the maximum it can take. Assign ID to SeekBar And TextView.
We can get the current progress value from a Seekbar in java class using getProgress() method. This method returns an integer value. Below code is used to get the current progress value from a Seek bar.
In Order to the seekBar to Change while you are in the Activity you need to Call the method setProgress(), and pass it a boolean animate value.
What is difference between ProgressBar and SeekBar? An example of SeekBar is your device's brightness control and volume control. Important Note: Attribute of a SeekBar are same as ProgressBar and the only difference is user determine the progress by moving a slider (thumb) in SeekBar.
Android has no such a view. But you can create custom components based on your need. For your particular case, this one should be fine. For more complex scenario, you can refer this one on github.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With