Still working on Part 2 of my Android development retrospective but I thought I would put this out here real quick.
The UISlider has settable minimum and maximum values (in float) and the slider’s current value is expressed as a float.
The SeekBar for Android always has a minimum of zero and the maximum can be set but only to an int. The current progress is always expressed as an int.
This kind of sucks so I made a class that extends SeekBar and named it BetterSeekBar. You can set minimum and maximum values as float and get the current value as a float as well. Internally, it sets the max to an int of 10,000 and calculates the current value based on floating point offsets and ratios.
You can get the BetterSeekBar.java class right from here (it’s 2KB.) I hope you find it useful!