Android Question SeekBar with Zero Center and Negative minimum value

walterf25

Expert
Licensed User
Longtime User
Hello all, i was wondering if anyone has made or found anything like this before, basically i need a seekbar or something similar, the initial value would be zero and would be in the center and it would have a negative minimum value and the same number as the maximum value.

Something like this.

I'm too lazy to wrap something like this at the moment, so if anyone has already done something similar or can point me in the right direction, i will really appreciate it.

Thanks,
walter
 

Attachments

  • seekbar.png
    seekbar.png
    3.8 KB · Views: 1,362

Johan Schoeman

Expert
Licensed User
Longtime User
Hello all, i was wondering if anyone has made or found anything like this before, basically i need a seekbar or something similar, the initial value would be zero and would be in the center and it would have a negative minimum value and the same number as the maximum value.

Something like this.

I'm too lazy to wrap something like this at the moment, so if anyone has already done something similar or can point me in the right direction, i will really appreciate it.

Thanks,
walter
I have done it before by placing a label below the seekbar. Set for eg the max value of the seebar to 200. Use your code to update the value displayed in the label so that when the seekbar value is 200 the label shows 100. If the seekbar value is 100 then the label shows 0. If the seekbar value is 0 the label shows -100. Do the calcs in your code for values inbetween
 
Upvote 0
Top