In SeekBar, the default value is from 0 to 100. When the onProgressChanged function onProgressChanged called from the SeekBar change listener, the progress number is passed in the progress parameter.
If you want to convert this progression to decimal from 0.0 → 10.0 for display or processing, all you have to do is divide the progress by 10 when you get the progress value and pass that value to the float. Here is a sample code:
aSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { float value = ((float)progress / 10.0);
source share