0

I saw Numberpicker as a tool to select a number from a range with minimum value of 0. I am looking for a range picker view to be able to select a range of values (instead of a value from a range) including negative values (for example (-100, +200)). Is there a pre-built solution for this?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Stack crawler
  • 369
  • 1
  • 4
  • 20
  • NumberPicker has `void setMaxValue(int maxValue)` which *sets the max value of the picker* and `void setMinValue(int minValue)` which *sets the min value of the picker*. `Is there a pre-built solution for this?` Yes, it's called... **NumberPicker**. – Phantômaxx Aug 27 '17 at 09:55
  • @ModularSynth Yes, I've checked them. SetMinValue() does not allow you to set a value less than 0. However, there are some hacks out there. – Stack crawler Aug 27 '17 at 09:58
  • https://stackoverflow.com/questions/14357520/android-numberpicker-negative-numbers – Phantômaxx Aug 27 '17 at 10:02

1 Answers1

1

There is no in-built solution for range picker, there are libraries out there which you can use to implement your requirement. For example see this library : https://github.com/oli107/material-range-bar

Umar Hussain
  • 3,461
  • 1
  • 16
  • 38